--------------------------------------------------------------------------------
hi guys below i am listing the code plz refer it once
class one
{
public static void main(
String a[])
{
System.out.println("first stmt");
return;
System.out.println("second stmt");
}
}
i am very much clear that the above code results in compile time error that
the stmt after return stmt is unreachable.
look at the other code below
class two
{ public static void main(......)
{
try
{
return;
}
catch(.....)
{
}
finally
{
System.out.println("due to finaly");
}
System.out.println("out of try-catch-finally stmt");//3
}
}
in the above code (i.e) the second code why i am not facing the same problem which i came across during the compilation of first code.
because i am very sure that the statement marked '//3' is surely not reachable.