Can A Reference Of A Subclass Be Assigned To A Superclass Object?
Can A Reference Of A Subclass Be Assigned To A Superclass Object? Is it possible a link to a superclass assign a reference to an object of a subclass? Yes, it is. Let a superclass and a subclass be given. If you declare a reference to a superclass, then this reference can be assigned the