Two Laptop Bag
The moose likes Java in General and the fly likes Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic


Joseph Vinodh

Joined: Feb 25, 2003
Posts: 11
How to implement multiple inheritance in Java through interfaces?Please give an example.
Suppose i am having a class called employee and another class supervisor. Now i would like to create a Manager class which should have both employee and supervisor + it's own attributes. How to reuse both the classes employee and supervisor in Manager class? Thanks in advance.
Garandi Garandi
Ranch Hand

Joined: Jan 07, 2003
Posts: 192
Make Employee a class and supervisor an interface.

Thank you
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

Thanks for stoppin' by the ranch, but please do not cross-post questions in different forums. We can answer them more effeciently if they're in just one place.
See here for other answers.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Joseph,
Welcome to JavaRanch. Please do not cross post topics. Choose one forum only per topic. Thank you for your cooperation.
Closing this. Please refer here to respond.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: Interfaces
jQuery in Action, 3rd edition