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 9004823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:59:13+00:00 2026-06-16T00:59:13+00:00

I am having some interesting problem with interfaces, please help me understand this concept.

  • 0

I am having some interesting problem with interfaces, please help me understand this concept.

I have three interfaces Itest, Itest3, Itest4. Interface Itest extends both Itest3 and Itest4 interfaces.
They both interfaces have common one method public void one(); Now a class Test implements Itest interface and overrides method one()

Now of which interface it inherits method of? What if I want to inherit common method of specific interface.
And
What effect it has on polymorphism ? what if another class only inherits Itest3 only. I think this will break at runtime.

Please help me understand what the advantage is of that?

Code is here…

public interface ITest extends Itest4,Itest3 {
    public static interface ITest2{

    }
}

public interface Itest3 {
    public void one();
}

public interface Itest4 {
    public void one();
}

public class Test implements ITest {    

    @Override
    public void one() {
        //Which interface method it overrides?
    }

public static void main(String... arg) {
        new Test();
    }

}
  • 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-06-16T00:59:15+00:00Added an answer on June 16, 2026 at 12:59 am

    The answer is: it doesn’t matter.

    An interface is just declarations, not code. Both interfaces declare a method public void one(). When you have an implementing class which implements this method, it implements it for both interfaces at the same time. This implementation in class Test doesn’t override anything. It’s the first implementation. There are no implementations in the interfaces it could override – just two identical declarations for it.

    When another class implements ITest3, it will need its own implementation for public void one(). Just like any other class which implements ITest4, or ITest. The only case where you wouldn’t need an own implementation, is when you would have a class which extends the class Test, because it could inherit the implementation from Test.

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

Sidebar

Related Questions

Here's an interesting problem: I have some jQuery that looks like this: $(document).ready(function() {
Hi im having an interesting problem. Update: From the comments im getting below this
i am having an interesting problem, This program is a simple image viewer and
Having an interesting little problem with my iPhone app. I have a view with
Having some trouble with R's garbage collection, when passing objects to C++. We have
Am having some trouble with the SkyDrive download process and hoping you can help
Hi I have an interesting problem. I Have an Employee Table AS Follows CREATE
I'm having an interesting but difficult problem with my JavaScript code. Basically, I'm trying
I'm having some interesting issues with passing in variables from within an object into
I have been having some fun with TextBlock bindings in Silverlight 4. I have

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.