Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3851324
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:08:41+00:00 2026-05-19T17:08:41+00:00

Possible Duplicates: Why does Java allow multiple inheritance from interfaces but not from abstract/concrete

  • 0

Possible Duplicates:
Why does Java allow multiple inheritance from interfaces but not from abstract/concrete classes
Why there is no multiple inheritance in Java, but implementing multiple interfaces is allowed

Instead of inheriting from multiple classes (which Java doesn’t allow), why are we told to implement multiple interfaces instead?

Surely the point of inheriting from multiple classes is the inherit their functionality – if you have to manually re-insert functionality (for each class extending a set of interfaces) what’s the point of using the interfaces? There’s no guarantee that two classes implementing the same set of interfaces will provide the same functionality – or am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T17:08:42+00:00Added an answer on May 19, 2026 at 5:08 pm

    Multiple inheritance is something that can cause multiple problems.

    Interfaces are used to give abilities to instances of the class that implement them. I personally use interfaces with composition(using instance variables that are references to other objects) in order to provide functionality to my class that would otherwise be achieved with multiple inheritance.

    In other words my class provides the functionality promised by the interface implemented but internally my class instance uses the instance variable to do the job.

    “There’s no guarantee that two classes
    implementing the same set of
    interfaces will provide the same
    functionality – or am I missing
    something?”

    About your statement above:

    Each method should adhere to a contract so no matter how you implement it the functionality of the method should always be the same if this is what is supposed to do. If it breaks the contract it means it was implemented wrongly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Why there is no multiple inheritance in Java, but implementing multiple interfaces
Possible Duplicates: Conditions when finally does not execute in a .net try..finally block In
Possible Duplicates: Do Hibernate table classes need to be Serializable? What does Serializable mean?
Possible Duplicates: Does Java have a limit on the class name length? Max name
Possible Duplicate: Why does C# not provide the C++ style ‘friend’ keyword? I'd like
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: How to lock compiled Java Classes to prevent decompilation ...ideally combined with
Possible Duplicates: Deep copy vs Shallow Copy In Java, what is a shallow copy?
Possible Duplicates: How does delete[] “know” the size of the operand array? ( POD
Possible Duplicates: myVar = !!someOtherVar What does the !! operator (double exclamation point) mean

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.