Java program to find whether the number is even or odd number
public class EvenOdd
{
public static void main(String args[ ])
{
int n=4;
if(n%2==0)
{
System.out.println("Number is even ");
}
else
{
System.out.println("Number is odd");
}
}
}
Output
Number is even
Comments