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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:21:58+00:00 2026-05-29T08:21:58+00:00

public class A extends B implements C { } Class B and interface C

  • 0
public class A extends B implements C {
}

Class B and interface C have the same member function name(not the same signature).
This code can’t be compiled. How can I solve this?

  • 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-29T08:21:59+00:00Added an answer on May 29, 2026 at 8:21 am

    The inherited class implements your interface method, so there should not be an error. In fact, both having the same name is really the idea of implementing an interface…

    Here’s a check list:

    • The method must have not only the same name, but the same signature. Make sure you’ve specified the correct argument and return types (this includes initial values).
    • If your sub class A also implements the same method, you must mark it as override. Same rules apply regarding the signature.
    • If you do override B’s method, it must not be declared final.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: public class Test extends JFrame implements ActionListener{ private static
I have this code: public class Window extends JFrame { public Window(){ ... JButton
The code I am using is: public class Test extends JFrame implements ActionListener {
I have an abstract entity: public abstract class Entity extends JPanel implements FocusListener And
If we have: public interface Foo{} public class Bar implements Foo{...} Is there a
Hi i have the following Groovy code: package fp; abstract class Function { public
Button class: class SubmitButton extends JButton implements ActionListener { public SubmitButton(String title){ super(title); ....
public class MaxHeap<T extends Comparable<T>> implements Heap<T>{ private T[] heap; private int lastIndex; public
public class PersonListEditor extends Composite implements IsEditor<ListEditor<Person, PersonListItemWidget>> { private static PersonListEditorUiBinder uiBinder =
I want to have a class which implements an interface, which specifies the specific

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.