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

  • Home
  • SEARCH
  • 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 6386645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:03:08+00:00 2026-05-25T03:03:08+00:00

UPDATE : Back in the days, it was just a compilation level problem with

  • 0

UPDATE : Back in the days, it was just a compilation level problem with maven.

The issue concerns the @Override annotation and super interfaces.

It’s a simple as it gets really the problem is that the @Override annotation is not scoped up to the upper interfaces …

Here is a bit of simple code to understand the problem :

public abstract interface CrudDao<T>
{
    void update(T bean);

    T get(Object... pk);

    void delete(Object ...pk);

    T create(T bean);
}



public interface BeanDao extends CrudDao<Bean>
{
    Bean moreSpecificGetMethod();
    void moreSpecificUpdateMethod();
}

public class BeanDaoImpl implements BeanDao {

    @Override
    public void update(Bean bean){}

    @Override
    public Bean get(Object... pk){}

    //... Rest of the methods 
}

The compiler says the methods should be created in the BeanDao interface. Why is it not resolving the methods from the super interface ?

  • 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-25T03:03:08+00:00Added an answer on May 25, 2026 at 3:03 am

    The compiler and the @Override annotation processor are just fine. During compilation with javac (on the command line), the following message is listed for the update method of BeanDaoImpl class:

    update(info.example.Bean) in info.example.BeanDaoImpl cannot implement
    update(T) in info.example.CrudDao; attempting to assign weaker access
    privileges; was public

    and the reason is because the update method in CrudDao is in fact public. According to the Java Language Specification:

    Every method declaration in the body of an interface is implicitly public.

    And on making the BeanDaoImpl.update method public, the error message goes away. The same holds good for similar error messages from other methods.

    There is also the problem with the Eclipse project settings. Just because you are using JDK
    1.6 to run Eclipse, you need not automatically have the compiler not complain about @Override annotation processing. You’ll need to set the Compiler compliance level of the project to 1.6, in your Java Compiler panel of your project settings. Having a value of 1.5 will result in the Eclipse annotation processor complain about unimplemented methods, when in fact, you those methods have been implemented, but declared in a superinterface, as in your case.

    The problem with the compiler compliance level settings is partly due to the initial @Override specification – it was restricted to superclasses alone and did not include interfaces as a supertype. This was fixed in Java 6, but the documentation was not updated. The compiler compliance level of 1.5 get the Eclipse annotation processor to treat @Override annotated methods as those requiring existence in the superclass, and not in a supertype.

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

Sidebar

Related Questions

If for instance, I was to give a response back to an ASP.Net Update
I have an extremely odd problem in my JUnit tests that I just can't
Just some days ago I started looking into a unit test framework called check,
Hi i am actually struggling with a problem for the past two days. I
Issue: Just started today, all references to any assembly outside of the solution fail
I am a newbie. I started php coding few days back. I want to
I have a Flash game I made way back in 2008. It runs super
been having this problem for a few days now and can't seem to find
I'm using jquery ajax to post updates back to my server. I'm concerned about
Update: Solved, with code I got it working, see my answer below for the

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.