Forums Register Login

Lowest, Highest, Average

+Pie Number of slices to send: Send
Guys,

Please take a look at this and see why I keep getting this error..



This is the error I am getting....
Enter output file name:
Numbers.txt
Exception in thread "main" java.lang.NumberFormatException: empty String
at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:9
86)
at java.lang.Double.parseDouble(Double.java:201)
at AverageText.highLowAverage(AverageText.java:79)
at AverageText.main(AverageText.java:26)
Press any key to continue . . .

PLEASE HELP....
+Pie Number of slices to send: Send
Does your file have any blank lines?

Try:
+Pie Number of slices to send: Send
You know the weirdest thing is...I sat here and stared at this program, and tried to do different things. I finally made a new txt file and now it works perfectly. I don't know why it wouldn't read the other file, but now it's working. I'm gonna see if I can improve the rest of the code.
Thanks so much for your help.
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1131 times.
Similar Threads
Adding Object to ArrayList
Entering many records..Need help!
Problems reading from a .txt file
Input files???
Input/Output Question...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:55:48.