Answer the following questions. a. How Java compensated for the absence of multiple inheritance? b. A class that contains any abstract methods must be declared as an abstract class even if that class contains some concrete (nonabstract) methods, why? c. Abstract class cannot be instantiated, why?
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Answer the following questions.
a. How Java compensated for the absence of multiple inheritance?
b. A class that contains any abstract methods must be declared as an abstract
class even if that class contains some concrete (nonabstract) methods, why?
c. Abstract class cannot be instantiated, why?
d. Interfaces cannot contain constructors, why?
e. In interfaces, data member should be initialized in the declaration, why?
f. An interface cannot declare static methods. It can only declare instance
methods, why?
Step by step
Solved in 2 steps with 2 images