Java Program to Check Whether a Given Number is Even or Odd

Write a Java program to check whether a given number is even or odd.

Source Code
class EvenOdd {

	public static void main(String[] args) {
		int num = Integer.parseInt(args[0]);
		if (num % 2 == 0) {
			System.out.println("Number is Even number.");
		else {
			System.out.println("Number is Odd number.");
C:\>java EvenOdd 12
Number is Even number.

C:\>java EvenOdd 45
Number is Odd number.