• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data save into txt file.

 
Nicky Eng
Ranch Hand
Posts: 378
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have some input from user, and will save into a text file.

Title : "will go for cousin wedding"
Date : "9/9/06"
Note : "borrow car from uncle"

all string data from user.
which class i should use? FileOutputStream, BufferedOutputStream, StringWriter etc....

and i want every record in text file in new line , such as:

abc.txt
-----------------------------------------------------------
will go for cousin wedding, 9/9/06, borrow car from uncle // a record
here is another record of inputs. // another record

-----------------------------------------------------------

how to do that?
 
Huw Morgan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A question I can answer. I have pincked the code from http://www.javacoffeebreak.com/java103/java103.html and hacked it a bit;

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic