Hi ,
The below code compiles and run without any problem.
public class
Test {
public static void main(
String args[])
{
System.out.println("A");
try
{
return; // line1
}
catch(Exception e)
{
System.out.println("B");
}
System.out.println("C"); // line2
}
}
Why the above code compiles when //line2 is not reachable . why it doesn't give unreachable statment error at the time of compilation ?
Raju