This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Create .txt file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Create .txt file" Watch "Create .txt file" New topic

Create .txt file

Nick George
Ranch Hand

Joined: Nov 17, 2003
Posts: 38
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.
Ko Ko Naing
Ranch Hand

Joined: Jun 08, 2002
Posts: 3178
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...

Co-author of SCMAD Exam Guide, Author of JMADPlus
Manoj Zachariah
Ranch Hand

Joined: Dec 08, 2003
Posts: 65
this program readers a file and writes it into another file. i hope this answers you question!
subject: Create .txt file
Similar Threads
Difference between vi and touch
Frequency of elements in Array
DBD::mysql installation error on trustix linux
text files creation
Urgent Replt Please