i need this program to determine and print the number of odd, even, and zero digits in an integer value read from the keyboard. the "int num = " statement has me confused. what do i type next?
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print("Enter a four-digit integer value: "); String intX = scan.next(); int oddints = 0; int evenints = 0; int zeros = 0; for(int i = 0; i < intX.length(); i++){ char y = intX.charAt(i); [U]int num = ;[/U] if(num == 0) zeros++; else if(num%2 == 0) evenints++; else oddints++; } System.out.println("Number of odd: " + oddints); System.out.println("Number of even: " + evenints); System.out.println("Number of zero: " + zeros); } }