· The Remainder or Modulus Operator in Java Java has one important arithmetical operator you may not be familiar with, %, also known as the modulus or remainder operatorThe % operator returns the remainder of two numbers For instance 10 % 3 is 1 because 10 divided by 3 leaves a remainder of 1 You can use % just as you might use any other more common operatorIf you are indeed talking about Java, I can't say anything on that as I have never dealt with the language, that is also a different language from these lessons, unless you meant to say JavaScript The criteria in this particular lesson stated Edit line 3 so the the correct prompts are displayed If you read that carefully it says edit line 3, that means no editing other lines The idea · Modulus Assign Operator Sep 03, 19 Core Java, Examples comments If we want to divide a variable with some value, and then assign the modulus or remainder back to the original variable, then the Modulus Assign Operator is a better way of doing it This operator when written is more concise and intuitive Below are some examples on how to do
Arithmetic Operators Java
