I am getting the \"Must be an array type but it resolved to string\" error in my code. It also says that i (in the code below) cannot be resolved to a variable which I don\'
It seems like that you have a few problems with the main syntax of basic java functions like loops or if-else statement. Click here for a good tutorial on these.
You must correct your for-loop and your if-statement:
for(int i=0;i
Now you wont get the Cant be resolved to a variable... exception.
Second thing is the usage of your string. You have to use it like this:
for(int i=0;i
Now all your exceptions should be eleminated.