Home >Java >Javagetting Started >What does '=' in java mean?

What does '=' in java mean?

王林
王林Original
2019-11-21 10:24:116012browse

What does '=' in java mean?

1. For variables

The equal sign has the function of assignment. For example, a=3 means assigning 3 to a. This is very simple. Everyone often assigns values. In addition to judging the double equal sign, the single equal sign is assigned when initializing the object.

2. For reference objects

The equal sign has the function of passing a reference (implicit pointer). This is not difficult to understand. For example, pointer: a=b, pointer of object a Points to the address of object b. At this time, a refers to the address of b, which plays the role of passing the address.

Recommended tutorial: Getting started with java development

The above is the detailed content of What does '=' in java mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn