posted 10 years ago
I have a text file that has contents as follows:
testing1,true,0,0.0,0,0.0,4.0,0.0,0.0,0.0,0.0
test2,true,0,0.0,0,0.0,4.0,0.0,0.0,0.0,0.0
I am trying to read only the first item in each list using a comma as a delimiter using the following code.
At line 16, with nextLine, I get the following in a drop down menu:
testing1,true,0,0.0,0,0.0,4.0,0.0,0.0,0.0,0.0
test2,true,0,0.0,0,0.0,4.0,0.0,0.0,0.0,0.0
If I change line 16 to next(), i get the following example:
testing1
true
0
0.0
0
4.0 and so on
I've taken a look around, but not really finding the solution. I know I am probably missing something simple and I'm probably going to slap my forehead once the mistake is revealed, but what am I missing, doing wrong?