Input Output
Input Output
Java I/O (Input and Output) is used to process the input and
produce the output.
Java uses the concept of a stream to make I/O operation fast. The
java.io package contains all the classes required for input and
output operations.
OutputStream
InputStream
Method Description
Method Description
public class FileOutputStream extends OutputStream
Example
import java.io.FileOutputStream;
public class FileOutputStreamExample
{
public static void main(String args[])
{ try
{
FileOutputStream fout=new FileOutputStream("D:\\testout.txt");
fout.write(65);
fout.close();
System.out.println("success...");
}
catch(Exception e){
System.out.println(e);
}
}
}