Even or Odd java program

Check whether the given number is even or odd, use scanner to get input from user(Getting integer input from user). To get input from in java, Scanner class is used. Scanner class should be imported to use the funtionality(methods) of Scanner.

 

import java.util.Scanner;
class evenodd
{
public static void main(String[] args)
{
	int number;
	Scanner in=new Scanner(System.in);
    System.out.println("Enter the number:"); 
    number=in.nextInt();
	
       if(number%2) 
       {
	    System.out.println("Given number is Even");
       }
       else
        {
	    System.out.println("ODD Number");
         }
   }
}

Even or Odd program without using modules.