Traditional Culture Encyclopedia - Traditional customs - JAVA take mode, take the remainder of the problem

JAVA take mode, take the remainder of the problem

/slash calculation, only take the integer part, you just need to calculate that value for example, 2/5 to get 0.4 over there to take the integer, that is, 0; % to take the remainder, as long as you can divide the specified number of that part of the cross out, the remainder is the remainder, for example, 2% 5 to take the remainder, because there is no part that can be divided by 5, it does not matter, then there is only 2, that is, the remainder of the number is 2