Question 1: What is an abstract class and how does it differ from a regular class?
Question 2: Why are abstract class constructors defined as protected?
Question 3: Class X defines method M1( ) as abstract. Class Y inherits from Class X and implements the method M1( ). Given the following code, explain why a reference to the abstract class X is allowed to refer to an object of the concrete class Y. Explain what happens when the reference to the abstract class X is used to execute method M1( ).
X obj = new Y( );
obj.M1( );
Question 4: What are interfaces allowed to contain?