Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

help regarding creating files with a particular extension  RSS feed

 
Avi Sridhar
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All, Thanks a lot for the continued help.

I want to creat a file with a particular extension, I know I need to use

java.io.FileWriter
java.io.FileOutputStream
java.io.File

but I do not know how I can use them. It will nice if you can give me examples of how I can create a file with a particular extension.

Help will be greatly appreciated.

Thanks,
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

Here is one possible combination to write to files:

The IO chapter in Bruce Eckel's Thinking In Java was a huge help to me when I started Java. I probably lifted those three lines from the book in 2000.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!