my code will not read zero's when they are in the number. Please help
import java.util.Scanner; public class oddevenzero { public static void main (String[] args){ int numofOdd = 0, numofEven = 0, numofZero = 0, length, left = 0; String num; Scanner scan = new Scanner (System.in); //instantiate Scanner object System.out.println ("This program will tell you how many even, odd, and zeros are in an integer: "); System.out.println("Enter a integer: "); num = scan.next(); System.out.println(""); length=num.length(); while (left < length){ num.charAt(left); if (num.charAt(left) == 0) numofZero = numofZero + 1; else if (num.charAt(left)%2 == 0) numofEven = numofEven + 1; else numofOdd = numofOdd + 1; left = left +1; } System.out.println ("Even Digits: " + numofEven); System.out.println ("Odd Digits: " + numofOdd); System.out.println ("Zero Digits: " + numofZero); } }