String in // taken from a single readline() inputthen I have a check
if (Character.isDigit(in.charAt(i)))which is, let's say, true and then
for (int j = 1; j <= (in.charAt(i)); j++) {
System.out.println(""int "+ (int) in.charAt(i)+ "-"+in.charAt(i)); // for testing purposes
}the i is standard in this example, say 5 and the charAt(i) is obviously a number since we passed the check, say 3the program is supposed to get in the j loop 3 times, but instead it goes around 49-53 times (I changed the program and input and got various results)
What's wrong? :crying:


Sign In
Create Account


Back to top









