Originally posted by Jothi Shankar Kumar Sankararaj:
Hi Above,
It dosn't compile simply because, the reference type is of class A and when you say A a = new Main() and do a.bMethod(), it checks for the method in class A which is not there, so it results in a compile time error.