- 1
plzz clarify my code error
2 Respuestas
+ 1
1) Where are you actually taking the input?
2) you declared al, bl arrays as integer type and accessing like a, b so both different..
3) toCharArray() is a method works on strings but not on integer array..
4) for(char c: a.toCharArray()){ //taking int to char, again next converting to int again..
int index= (int) c;
....}
Oh I understood, you are trying to take 2 strings then take 2 string input to a, b just like
String a =" string1";
String b = "string2";
Now I hope it works...
Edit :
kumar_bittu yes. Just add those 2 strings to your program. It works
0
a b are not declared