Programming Code Center(PCC)
[JAVA]

(PCC)::[how-to-write-Java-Program-to-Check-Whether-a-Number-is-Even-or-Odd]::[java]

File Name : EvenOdd.java

import java.util.Scanner;

public class EvenOdd {

    public static void main(String[] args) {

        Scanner reader = new Scanner(System.in);

        System.out.print("Enter a number: ");
        int num = reader.nextInt();

        if(num % 2 == 0)
            System.out.println(num + " is even");
        else
            System.out.println(num + " is odd");
    }
}

Output :

EvenOdd.jpg