package com.jignesh;
import java.io.File;
public class WriteFileExample
{
public static void main(String[] args)
{
try{
File file = new File("c:\\jigneshExample.txt");
if (!file.exists()) {
file.createNewFile();
}
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
bw.write("hello how are you!");
bw.close();
}catch(Exception e){
e.printStackTrace();
}
}
}
nice
ReplyDeleteThis blog awesome and i learn a lot about programming from here.The best thing about this blog is that you doing from beginning to experts level.
ReplyDeletebest web design services | professional web development company
That's great information. Thanks for sharing this blog. I did a search and found your blog and glowing review. It's been a big help! Thanx for sharing.
ReplyDeleteLaravel Development Services | Angularjs Development Services