Source: http://www.imooc.com/code/1298
An assignment operator is a symbol that specifies a numeric value for a variable or constant. If you can use "=" to assign the result of the right expression to the left operand.
Common assignment operators supported by Java, as shown in the following table:
Task
Let's hurry up and do a practice, pro ...
Write code in an empty space in the editor, and apply the assignment operator to achieve the following results:
1 Public classhelloworld{2 Public Static voidMain (string[] args) {3 intone = 10 ;4 intboth = 20 ;5 intthree = 0 ;6three = one +both ;7System.out.println ("three = one + both ==>" +three);8Three + =One ;9System.out.println ("three + = one ==>" +three);TenThree-=One ; OneSystem.out.println ("Three-= one ==>" +three); AThree *=One ; -System.out.println ("Three *= one ==>" +three); -Three/=One ; theSystem.out.println ("Three/= one ==>" +three); -Three%=One ; -System.out.println ("Three%= one ==>" +three); - } +}
Web-android Engineer first form the assignment operator in -3-3 Java