Java Programs
Monday, February 10, 2014
Example of FileInputStream in java.
import java.io.*;
class MyFileReader
{
public static void main(String surat[]) throws IOException
{
FileInputStream fr=new FileInputStream("Temp.txt");
int i=0;
while((i=fr.read())!=-1)
System.out.print((char)i);
fr.close();
}
}
Output:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment