+ 3
A 'modulo' in Java?
Can someone explain me what a modulo is in Java?
2 Réponses
+ 4
% is the modulo in Java.
it gives the remainder of the division.
e.g. 3%2 wil give 1
+ 2
%
modulo divides to numbers and delivers the remainder :
5%2 = 1
10%2 = 0