I have a program that reads from a file, takes each word and adds it to an array as a String. I\'m having a bit of trouble with adding the Strings to the array.
I get the e
That's not how you add an element to Java array. Keep a counter outside the loop that will be incremented inside the loop block and then add elements like below:
int i = 0;
while(.....){
.
.
array[i] = //element to be added
i++;
}