HELP
Write an application that reads an integer and determines and prints whether it is odd or even. [Hint: Use the remainder operator. An even number is amultiple of 2. Any multiple of 2 leaves a remainder of 0 when divided by 2.]
import java.util.Scanner;
publicclass _2_25
{
publicstaticvoid main(String[] args)
{
Scanner input =new Scanner(System.in);
int num = 0;
System.out.print("Enter an integer: ");
num = input.nextInt();
if(input.hasNextInt() %= 2)
{
System.out.print("the integer is even");
}
else
{
System.out.print("the integer is an odd");
}
}
}
I don't know how to solve this thing

