To assign values to different variables, you must use the assign operator "=". Here "=" does not mean "equal to", but "assign value". For example:
A1 = 3;
This statement is used to assign integer 3 to variable a1. Make the value of variable a1 3 at this time. Let's look at the following statement:
A1 = a1 + 1;
As you know, this representation method won't work in mathematics, but as a value assignment statement, it is often used in future programming, add the result of a1 and 1 to the a1 variable for storage. If the a1 value is 3 before the statement is executed, the a1 value changes to 4 after the statement is executed.
Sometimes we often use the following statement:
J = I = 3;
The processing method of this statement system is: first assign integer 3 to variable I, and then convert (I = 3) to a value expression. The value of this expression (calculation result) also 3. Finally, assign the value of expression (I = 3) to j. Therefore, the value of variable j is 3.
Special Recommendation for editing: Java Relational operators and relational expressions