String index out of range: n
Im having a bit of a problem with this code each time i execute it it gives me an error String index out of range: 'n' n - is the no. of characters that is entered in the textbox pertaining to this code... (that is textbox - t2.)it is stuck at that first textbox checking it does not go over to the next as mentioned in the array. Object c1[] = { t2.getText(), t3.getText(), t4.getText() }; String b; String f; int counter = 0; int d; for(int i =0;i<=2;i++) { b = c1[i].toString(); for(int j=0;j<=b.length();j++) { d = (int)b.charAt(j); if((d<65 || d>90)||(d<97 || d>122)) { counter++; } } } it is