Hi!
This compile without error.
public class TestThrow
{
public static void main(
String[] args)throws Exception
{
try{
System.out.println("TestThrow");
throw new Exception("mistake");
}catch(Exception e){
System.out.println("TestThrow catch");
}
}
}
But this give compile error
public class TestThrow
{
public static void main(String[] args)throws Exception
{
try{
throw new Exception("mistake");
System.out.println("TestThrow");
}catch(Exception e){
System.out.println("TestThrow catch");
}
}
}
Why???
Thanks in advence.