Java
Programming and Technical
Does java support multiple
inheritance? if not, what is the solution?
Read Solution (Total 10)
-
- No, java class doesn't support multiple inheritance but interface in java support multiple inheritance because java class has implementation part so it cannot inherit. where as interface doesn't have implementation so it supports multiple inheritance.
- 8 years agoHelpfull: Yes(2) No(0)
- no java does not support multiple inheritance instead it is replaced by another method dynamic method dispatch
- 9 years agoHelpfull: Yes(0) No(0)
- Using interfaces
- 8 years agoHelpfull: Yes(0) No(0)
- diamond problem occurs
- 8 years agoHelpfull: Yes(0) No(0)
- java doesn't support multiple inheritance ,but when we use interface we can use multiple inheritance in java .
- 8 years agoHelpfull: Yes(0) No(0)
- not support.
because you can't extends more than one class - 8 years agoHelpfull: Yes(0) No(0)
- No,Interface is the solution of inheritance
- 7 years agoHelpfull: Yes(0) No(0)
- Java does not support multiple inheritance
reason diamond problem
solution is use interface - 7 years agoHelpfull: Yes(0) No(0)
- No java doesn't support multiple inheritance as multiple inheritance can be implemented by using interfaces in java.
- 6 years agoHelpfull: Yes(0) No(0)
- java does not support multiple inheritence.
instead of multiple inheritence it uses interface. - 6 years agoHelpfull: Yes(0) No(0)
Java Other Question