Code:
import java.io.*;
class FISDemo
{
public static void main(String args[]) throws IOException,FileNotFoundException
{
FileInputStream fis = new FileInputStream("abc.txt");
int data = fis.read();
while(data != -1)
{
char c = (char) data;
System.out.print(c);
data = fis.read();
}
fis.close();
}
}
class FISDemo
{
public static void main(String args[]) throws IOException,FileNotFoundException
{
FileInputStream fis = new FileInputStream("abc.txt");
int data = fis.read();
while(data != -1)
{
char c = (char) data;
System.out.print(c);
data = fis.read();
}
fis.close();
}
}