Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create .txt file

 
Nick George
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right, so i can both read and write to text pre-existing text files, and i was wondering if it is possible to create new text files.
Thanks,
Nick
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course, if u create a new File object, then if ur specified file is not in the directory, then it is created as u specify in the parameter of the constructor...
It's very simple to create a new file in Java...
 
Manoj Zachariah
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this program readers a file and writes it into another file. i hope this answers you question!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic