Hi Everyone, I'm new to java and working on reading a text file into my java program. The issue with the code I have built is it only reads the text on each line and errors if there is more that one text on the line. Looking for some advice.
Here is the txt reader,
I need it to read 1 2 3 4 5, and let me choose one of them, right now I can only get it to read
1
2
3
4
5
from the text file. I believe it has something to do with my rates[i] = Double.parseDouble(line); but can't figure out how to correct it. Please help I'm not getting any help anywhere else.
Here is the txt reader,
I need it to read 1 2 3 4 5, and let me choose one of them, right now I can only get it to read
1
2
3
4
5
from the text file. I believe it has something to do with my rates[i] = Double.parseDouble(line); but can't figure out how to correct it. Please help I'm not getting any help anywhere else.