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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:43:18+00:00 2026-06-16T01:43:18+00:00

I have this public abstract class MyClass with abstract method abstract public void myMethod()

  • 0

I have this public abstract class MyClass with abstract method abstract public void myMethod() in my Android library project.

I am trying to build a concrete implementation of this class in another project, which is an application project and references the library project. The method implementation in the subclass is marked with “@Override” and Eclipse gives me the following error:

The method myMethod() of type MySubClass must override or implement a
supertype method

I remove “@Override” and error becomes a warning:

The method MySubClass.myMethod() does not override the inherited
method from MyClass since it is private to a different package

What does this mean? Yes, these classes are in different projects and different packages but what does this have to do with inheritance? Both methods are public.

Here is the code for the superclass:

package com.emret.myPackage;

//Some imports here

public abstract class ThingsProvider {

//Class code here

    abstract public void createThings();

}

Here is the subclass:

package com.emret.myPackage.subPackage;

//Some imports here

public class SmallThingsProvider extends ThingsProvider {

//Class code here

    @Override
    public void createThings() {
        createThing(0, R.drawable.cat, R.raw.cat);
        createThing(1, R.drawable.dog, R.raw.dog);
        createThing(2, R.drawable.cow, R.raw.cow);
        createThing(3, R.drawable.sheep, R.raw.goat);
        createThing(4, R.drawable.bicycle, R.raw.bicycle);
    }
}
  • 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-16T01:43:19+00:00Added an answer on June 16, 2026 at 1:43 am

    It appears “yshavits” pointed to the exact pain point but other limitations got in the way.

    My abstract method was package-private at the beginning. I changed it to a public when I encountered the error in the subclass but the error did not disappear after changing it to public.

    It turns out, references in a referencing project is not updated as long as the referenced project is compiled completely and successfully. Any single error in the referenced project prevents a successful compile and that prevents the referencing project to detect updated class information of it.

    My referenced project had another error. Even completely separate from classes above, it prevents a successful compile and prevents reference updates in referencing project.

    Background compiler is not as smart as I hoped it seems.

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

Sidebar

Related Questions

Let's say that I have this: public abstract class myClass<T> : Ob<T> where T
I have an abstract method public abstract Class<? extends MyClass> getMySpecialClass(); In another method
I have a model that looks something like this: public abstract class Parent {
Let's say I have this class: public abstract class CustomerCollectionBase : Collection<Customer>{} One of
I have this class: public abstract class Directory { protected int id; protected File
I have a situation like this: public abstract class BaseClass { public abstract string
I have an Abstract class that is like: public abstract class myClass{ public abstract
So I have this class public static class MyClass { static MyClass() { ...
I have a method that looks like this public static <T extends MyClass, X
I have this: public class ClientSession : TcpClient { public int SessionGUID = 0;

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.