Define abstract class


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.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Define abstract class
Reference No:- TGS0892882

Expected delivery within 24 Hours