And the technical reason is that Java is a statically typed language - that is, the compiler uses the type information to check at compile time whether a method call is possible.
Imagine that class B declared a new method that isn't available in class A. Consequently, you could call that method on any B reference. If such a reference could point to an instance of A, the compiler couldn't know whether the object actually *knows* the method you are trying to call.
Google for "Liskov Substitution Principle" for more on this.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
subject: Assigning base class object to sub class reference ?