aspose file tools*
The moose likes Beginning Java and the fly likes write to console after writing to file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "write to console after writing to file" Watch "write to console after writing to file" New topic
Author

write to console after writing to file

Charity Burns
Greenhorn

Joined: Aug 05, 2012
Posts: 1
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

Joined: Oct 24, 2010
Posts: 563
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.


Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: write to console after writing to file