wood burning stoves 2.0*
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

write to console after writing to file

Charity Burns

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

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

Learning Java using Eclipse on OpenSUSE 11.2
Linux user#: 501795
subject: write to console after writing to file
Similar Threads
I'm lost, need help figuring what todo?
Alpha beta pruning with negamax
Scanner class help
Need help ending number guessing game and asking if user wants to play again
standard deviation