Java Programs
Monday, February 10, 2014
Example of FileOutputStream in java
import java.io.*;
class MyFileWriter
{
public static void main(String surat[])
{
try
{
FileOutputStream fw=new FileOutputStream("Temp.txt");
String s="Good Day";
byte ch[]=s.getBytes();
fw.write(ch);
fw.close();
}
catch(Exception e){}
}
}
Output:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment