hi friends
pleaze tell me
what is the meaning of the return;
i know if we use return int; it return integer to the inclosing method
but im using return in the catch block , which is in the main method
please tell me what it return and for whom it will return
if i remove return from catch block , it shows error message like
fin variable might not have initialised
my code is as
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();
}
}