Assignment Operators
An assignment operator is denoted by the single equal sign, =. It works in java much as it does in any other computer language. The assignment operator has this common form:
var = expression;
here, the type of var have to be compatible along with the type of expression.
The assignment operator does have one interesting attribute which you might not be familiar along with: it permits you to create a chain of assignments. For instance, let consider this fragment;
int x, y, z;
x=y=z=100; //set x, y, and z to 100