I try to execute the program it not gett executed.
can you help me.
These program is for to show the content in a file.
import java.io.*;
class showfile
{
public static void main(
String arg[])
{
int i;
FileInputStream fin;
try
{
fin=new FileInputStream(arg[0]);
}
catch(FileNotFoundException e)
{
System.out.println("File Not Found");
return;
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("Usage File: ShowFile File");
return;
}
do
{
i=fin.read();
if( i != -1)
{
System.out.println((char) i);
}
}while(i!=-1);
fin.close();
}
}
kethare@sify.com