import java.io.*;
class testexception
{
public void some() throws IOException
{
System.out.println("some");
}
public void some2() throws FileNotFoundException
{
some();
System.out.println("some2");
}
public void some3()
{
try
{
some2();
}
catch(IOException e)
{
System.out.println("i got you");
}
}
public static void main(
String args[])
{
testexception te1 = new testexception();
te1.some3();
}
}
It's giving me a compile time error that IoException must be declared or it must be caught. But i am catching IOException in the some3. Could somebody please explain this to me.
Thanks.