In reply to yourcheers:
Subclass sc1=new(); is declared earlier itself. As suggested I had executed using new also it resulted in error.
In reply to yourcheers:
Subclass sc1=new(); is declared earlier itself. As suggested I had executed using new also it resulted in error.