import java.io.*;
public class FileRead{
public static void main(String args[])throws IOException{
String str = "This is Performance engineering blog";
FileWriter fw = new FileWriter("test.txt");
for(int i=0;i<str.length();i++){
fw.write(str.charAt(i));
}
fw.close();
}
}
output(file content):-
This is Performance engineering blog
public class FileRead{
public static void main(String args[])throws IOException{
String str = "This is Performance engineering blog";
FileWriter fw = new FileWriter("test.txt");
for(int i=0;i<str.length();i++){
fw.write(str.charAt(i));
}
fw.close();
}
}
This is Performance engineering blog
No comments:
Post a Comment