- A In Java, multiple inheritance is supported, while in C++ it is not.
- B In C++, multiple inheritance is supported, while in Java it is not.
- C In Java, all classes inherit from a common superclass, while in C++ they do not.
- D In C++, classes can have multiple levels of inheritance, while in Java they cannot.
- Share this MCQ
Answer:
A
Share this MCQ
In Java, multiple inheritance is supported, while in C++ it is not. This means that a class in Java can inherit from multiple classes, while in C++ a class can only inherit from one class. In addition, in Java all classes inherit from a common superclass, while in C++ they do not. Furthermore, in C++ classes can have multiple levels of inheritance, while in Java they cannot.
Click me to Read more Question & Answer of Java Interviews MCQsShare this MCQ