class C
{
private
String get(String str)
{
try
{
throw new Exception();
return str;
}
catch (Exception e)
{
return null;
}
}
public static void main(String[] args)
{
try
{
System.out.println((new C()).get("C"));
}
catch (Exception e)
{
System.out.println("Exception");
}
}
}
This programm is givin compile time error.
>>>unreachable statement
>>>return str
Why???