Assignment operators

The assignment operators store, or assign, a value into variables.
The basic assignment operator is the equals sign (=), like:

This basic assignment operator can however be (and is often) used in combination with other types of operators.
This is an example of how it is used in combination with the arithmetic operator (+):

The output is:

Other arithmetic operators in combination with the = operator:

Shift operators can also be combined with the assignment operator:

As can bitwise:

Search for more Java info on this site here:
Custom Search

Please type any questions here.