This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: write to console after writing to file
It's not a secret anymore!