I had the while (true) loop to fill the array. I had tried to use a for loop, but every time it would hit that null at the end of the line, it would go to the noSuchElementException and initialize...
Type: Posts; User: aznenginerd
I had the while (true) loop to fill the array. I had tried to use a for loop, but every time it would hit that null at the end of the line, it would go to the noSuchElementException and initialize...
I changed my loop to the following:
while((line = bufReader.readLine()) != null)
{
tokenizer = new StringTokenizer(line);
more =...
I had tried to do it with "hasMoreTokens" but I couldn't get it to work correctly. It would still throw that "NoSuchElementException" and throw it out of the loop before it even writes to the...
I'm fairly new to JAVA and taking a class. One of the big parts of my assignment is to read from a text file and write those values to an array.
For the most part, I got it to work where it will...