76.FileReader IN JAVA
//filereader
import java.io.*;
class filereader
{
public static void main(String[] args) {
try
{
FileReader fr = new FileReader("my.txt");
int ch;
while((ch = fr.read()) != -1)
{
System.out.print((char) ch );
}
fr.close();
}
catch(Exception e)
{
System.out.println(e);
}
}
}
OUTPUT:
Milan Bakotra
Comments
Post a Comment