In this article, a detailed explanation of assignment operators and its uses is observed which in particular will be the Modulus AND assignment operator ( %= ).
Assignment Operators
You know different operators are supported by the Java language and one of its kind is the assignment operator. These assignment operators are basically divided into eleven types and are shown below
Simple assignment operator “ = “
Add AND assignment operator “ += “
Subtract AND assignment operator “ -= “
Multiply AND assignment operator “ *= “
Divide AND assignment operator “/=”
Modulus AND assignment operator “%=”
Left Shift AND assignment operator “<<=”
Right Shift AND assignment operator “>.=”
Bitwise AND assignment operator “ &=”
Bitwise exclusive OR and assignment operator “ ^= “
Bitwise inclusive OR and assignment operator “!=”
Approach
The modulus AND operator (%=) will perform modulus operation of the two operands and the obtained result is allocated to the left operand of the statement. Read more
Top comments (0)