This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

write to a file without delete it (noob question)  RSS feed

 
Quiddo Quitch
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have this simple code, who writes "hello world" into a text file ...

what can i do if i want to write a NEW "hello world" everytime i run this code, without deleting the old "hello world" ... ?



thanks !
 
Rob Spoor
Sheriff
Posts: 21047
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the java.io.FileWriter constructors.
 
Quiddo Quitch
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
perfect !! thanks for make me learn
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!