Tell me what is multiple inheritance? Is it supported by Java?
Submitted by: MuhammadIf a child class inherits the property from multiple classes is known as multiple inheritance. Java does not allow to extend multiple classes.
The problem with multiple inheritance is that if multiple parent classes have a same method name, then at runtime it becomes difficult for the compiler to decide which method to execute from the child class.
Therefore, Java doesn't support multiple inheritance. The problem is commonly referred as Diamond Problem.
Submitted by: Muhammad
The problem with multiple inheritance is that if multiple parent classes have a same method name, then at runtime it becomes difficult for the compiler to decide which method to execute from the child class.
Therefore, Java doesn't support multiple inheritance. The problem is commonly referred as Diamond Problem.
Submitted by: Muhammad
Read Online Java Software Engineer Job Interview Questions And Answers
Top Java Software Engineer Questions
☺ | Do you know how threadsafe is enum in Java? |
☺ | Explain me what is a good usecase of calling System.gc()? |
☺ | Explain me why doesn’t the following code generate a NullPointerException even when the instance is null? |
☺ | Do you know what is the advantage of generic collection? |
☺ | Tell us what do you mean by aggregation? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |