2
Reply

In Which case implementing interface is better than extending the Adapter classes in JAVA ?

Ashish Y

Ashish Y

17y
6k
0
Reply

    If you want to extend any other class then you must choose to implement an interface instead of extending a class

    Multiple inheritance is not possible in java for the case of a Class but for the case of inheritance it is possible

    • Java doesn't support multiple inheritance(By extending two classes)
    • Suppose we want to extend a parent class and assign its properties to its child class then -
    • In this case we can't extend Adapter class as

    "" class extends ,""      is not possible.