Array index out of bound

there is run time error at line 10 which says array index out of bound whereas according to the loop it shouldn’t have happened.

you can check the code

Hey @nik1898
let String s = “12”;
for (int i = 0; i < num.length(); i++) {
a[i] = table[(num.charAt(i))];// num.charAt(i) 1 ke liye Gives -->49 ASCII code dega
n[i] = 0;
isko sahi kro