Problem:
Class X defines method M1( ) as abstract. Class Y inherits from Class X and implements the method M1(). Question-Explain why a reference to the abstract class X is allowed to refer to an object of the concrete class Y.
Question- Explain what happens when the reference to the abstract class X is used to execute method M1( ).
X obj = new Y ( );
obj.M1( );
Please describe what happens when the reference to the abstract class X is used to execute method.