Hi,
Shouldn't it give compiler error due to try catch block in line1?Coz Exception that is never thrown is caught?
The variable myref is a reference of type TechnoSampleSub. The method
test is called on an object of TechnoSampleSub type.
This throws no exception and hence no problems. Even if an excpeion were to arise, it would be caught by the catch block specified.
Regards,
Anupreet