hi friends
help me
if i remove return statement from catch block it shows
fin valriable might not have been initialised.
otherwise compile easy.
also tell me what is the meaning of return , actually what it is doing there
help me friends
import java.io.*;
class ShowFile
{
public static void main(
String args[]) throws IOException
{
int i;
FileInputStream fin;
String ss=args[0];
try
{
System.out.println("pravin");
fin=new FileInputStream(ss);
System.out.println("pravin2");
}
catch(FileNotFoundException e)
{
System.out.println("File Not Found");
return;
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("Usage: ShowFile file");
return;
}
do
{
System.out.println("pravin2");
i=fin.read();
if(i!=-1)
System.out.print((char)i);
}
while(i!=-1);
fin.close();
}
}