Java

Check if Number is Even or Odd in JAVA1 min read

Question: Write a program to check whether the given number is even or odd in JAVA

Answer:




An even number is any number whose remainder of the division over 2 is equal to 0. It is also said that they are multiples of 2.

An odd number is any number whose remainder of the division out of 2 is equal to 1.

Java Code:

 

Leave a Comment