Assignment operators are used in Java to assign values to variables. For example,
The assignment operator assigns the value on its right to the variable on its left. Here, 5 is assigned to the variable age using = operator. There are other assignment operators too.