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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:51:15+00:00 2026-06-12T16:51:15+00:00

In a repository that was created in Ubuntu Linux and compiled under OpenJDK 6,

  • 0

In a repository that was created in Ubuntu Linux and compiled under OpenJDK 6, when implementing LocationListener and SensorListener, adding the @Override tag above the inherited methods compiles fine.

But when the repo is cloned onto a Windows system with Oracle Java, some of the @Override generates errors. Example below:
The method onAccuracyChanged(Sensor, int) of type ExpeditionActivity must override a superclass method

It seems that this error occurs only when you add @Override above a method that is inherited from implementing an interface. Adding @Override above a method inherited from a base class does not generate the error. This actually makes sense, because you are actually overriding the logic of the original method.

SO, is it syactically correct to write @Override above inherited interface methods?

  • 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-12T16:51:16+00:00Added an answer on June 12, 2026 at 4:51 pm

    @Override is limited to base class methods in JDK 5.

    JDK 6 introduced the ability to apply @Override to interface methods.

    Eclipse must be set to use JDK6/JDK6 language level to use @Override on interface methods.

    To answer your question, “yes, if you’re compiling under JDK 6+”.

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

Sidebar

Related Questions

I created a new repository on github. I selected one of the options that
Newbie question: I just installed VisualSVN Server and created a repository. I noticed that
I have created and committed to Mercurial repository that was created on my local
I have a repository that I created early in the learning curve of a
I have a git repository that was originally created using git-svn. Now I have
I have created a repository that is returning data from my database using Entity
I have created a simple repository class that is returning a list of Projects:
i have a git repository that i created some time ago, and i made
I have a Subversion repository (running SVN 1.6.6) on an Ubuntu Linux server, and
I have a mercurial repository that is not accessible by Http. I can't figure

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.