I am having trouble trying to compare a string using charAt() for some reason it throws a fit when trying to compare it to "1". Can someone point me in the right direction?
public static void nthDigitTally1(int n, int num, int tally[]){
String numString = Integer.toString(num);
System.out.println(numString);
System.out.println(numString.charAt(2));
for(int i = 0; i < countDigits(num); i++){
if(numString.charAt(i) == "1"){
System.out.println("It works cappin");
}
}