• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with writing in txt file  RSS feed

 
Justine Kline
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is what i got. but it doesnt write in the text file, i dont know why

 
Marilyn de Queiroz
Sheriff
Posts: 9082
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Justine. Welcome to JavaRanch. This particular part of JavaRanch is a little different. It is for students of the Cattle Drive to post about their assignments. So I'm going to move your post to another section that deals with more "general" java questions.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch (again)

Why are you using a PrintWriter rather than a BufferedWriter? Why haven't you tried the Formatter class, which is much easier to use if you are writing plain text?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!