-2

I am developing a java playframework project.I am using Book class which is a sub class.It is extended from Item abstract class.I want to use com.avaje.ebean library and extend the Book class to add data to the database.So it means I have to extend two classes. Is there alternative way of doing this? Can you give me any solution.

  • 1
    Possible duplicate of [Extending from two classes](https://stackoverflow.com/questions/5836662/extending-from-two-classes) – MWB Nov 19 '18 at 17:53

1 Answers1

0

You can do it by Multi-level inheritance: class a {} class b extends a{} class c extends b{}

or else you have to go for interface concept, there you can implement n no. of classes

user9150771
  • 61
  • 1
  • 9