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.
Asked
Active
Viewed 131 times
-2
-
1Possible duplicate of [Extending from two classes](https://stackoverflow.com/questions/5836662/extending-from-two-classes) – MWB Nov 19 '18 at 17:53
1 Answers
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
-
So if I extend my abstract class using ebean model class. will I be able to add sub class data to the database. – kavinda nehansana Nov 19 '18 at 18:17