Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

address book

 
sam jones
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
alright so i am working on a address book program in java, but i have run into a rather large problem. i do not know how to write to an output file w/o erasing the info that is already there (using printwriter). write now the program just gets input and writes it out, i am trying to fix this problem before i do anything else with it.



 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create a PrintWriter by explicitly handing it a FileWriter. java.io.FileWriter itself has several constructors -- follow the link and carefully read the Javadocs for each of the constructors. I promise you will find your solution quickly!
 
sam jones
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
worked perfectly, thanks for the help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic