File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

write to console after writing to file

 
Charity Burns
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote my data to a file but I seem to be having an issue reading the file and then writing it to the console. I'm thinking my file is not integers like I think they are so maybe the next int is not working because of it. But basically I'm not getting anything on the console when I run it.
 
Greg Brannon
Bartender
Posts: 563
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at the resulting data file, golfScores.txt? That might give you some hints.

You might also investigate whether the while loop condition,

while (input.hasNextInt()){

is evaluating to true so that the code in the block runs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic