This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Can't write collection back to disk Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can Watch "Can New topic

Can't write collection back to disk

Paul Immoos

Joined: Mar 30, 2006
Posts: 2
I am doing a server/client setup and this is the server code. Here is wherethe info is loaded, it comes from the employees.txt:

then here is teh code for writing the collection back to disk in sequence to udpate any changes teh client made.

once the Server is compiled and I run it, the data is then deleted out of my employees.txt. I know i am missing something, i just don't have a clue what it is

BTW here is the all the code for the program:
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
Your writing loop has an empty body:

while(p.hasNext()); //<-- note semicolon

There is no emoticon for what I am feeling!
It is sorta covered in the JavaRanch Style Guide.
subject: Can't write collection back to disk
It's not a secret anymore!