How to find odd and even number in Java

In java a number can be identified as odd or even by using modulo operator i.e. “%”. The modulo operator gives the remainder of a division operation, for instance the result of 5 % 3 would be 2. Below is the code snippet of this algorithm in java: Continue reading