Checked the tutorials, but there's only examples with the for loop with int arrays, not with string arrays. Can't get this to work. I just want to loop through the array, but the following code says "The local variable i may not have been initialized" for some reason.
String [] words = in.split(" ");
for(int i; i<words.length; i++){
If I change it in words.length(), it says "Cannot invoke length() on the array type String[]", which sounds quite right.
words.size() doesn't work either ("Cannot invoke size() on the array type String[]").
What would be the correct syntax for just looping through a string array?
thanks.