+ 1

What is the meaning of "%" in java?

1st Jun 2017, 5:50 AM
Lucy Fifa
Lucy Fifa - avatar
1 ответ
0
just as emma had stated "%" is an operator and is called modulus, when used between operands it result to the remainder this is how it flows 4 % 3 --> 4 / 3 ==> 1 but 3 only divides 4 once and there is still a remainder 1 so "%" returns 1 as the answer 4 % 3 = 1 just simply see it as the remainder after some division
1st Jun 2017, 7:54 AM
John Emma
John Emma - avatar