Bookmark Topic Watch Topic
  • New Topic

Interfaces

 
Joseph Vinodh
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 192
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Make Employee a class and supervisor an interface.

Thank you
Garandi
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Joseph:
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.
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic