Suppose case 2 is also working, then your compiler sees "b" as a object of class "B". Now you can say "b.fb()". But actually "b" is an object of "A"(Remember you assigned an object of class "A" to "b"). there is no function fb() in class "A". your application crashes!!