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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:08:57+00:00 2026-05-21T15:08:57+00:00

I am occurring error like: The method onClick(View) of type oddg must override a

  • 0

I am occurring error like:

“The method onClick(View) of type oddg must override a superclass
method”.

I am confused where exactly error has occurred.
Can you please guide me, what exactly error is?

public class oddg extends Activity implements OnClickListener
{
        ProgressDialog dialog;
        int increment;
        int maximum ;
        private static final String TAG = "ServicesDemo";

        @Override
        public void onCreate(Bundle savedInstanceState) 
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main1);
            Button startbtn = (Button) findViewById(R.id.startbtn);
            startbtn.setOnClickListener(this);

        }

        @Override
        public void onClick(View arg0)
        { }
}

This is my code…
Thanks in Advance–
Onkar

  • 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-21T15:08:58+00:00Added an answer on May 21, 2026 at 3:08 pm

    I think the problem is that you’re compiler settings are set to Java 1.5 instead of Java 1.6. Since Java 1.6 the annotation @Override is not only possible for inherited methods from a superclass but also for implemented methods from an interface. But if your compiler is still set to 1.5 the problem is that he will check if you’re overwriting a method from a super class. In your example this is not the case since you’re implementing a method from an interface.

    As a side note it would be good to follow Java Naming Conventions in your code. So all classes begin with an upper case letter.

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

Sidebar

Related Questions

I wanted to create a view that looked something like the following but i
I have a really odd 2104 error occurring when I am hosting a Silverlight
I have a method that looks like this: try { doStuff(); } catch (Exception
This is only occurring on a user's machine, not mine. I cannot recreate this
There is one problem occurring when I am trying to dynamically generate the label
I have a set of transactions occurring at specific points in time: CREATE TABLE
I've got a weird bug occurring in a compact database on a Vista deployment
I have a certain loop occurring several times in various functions in my code.
How to find the integer occurring maximum number of times (mode) in an unsorted
during my debug sessions I found a strange thing occurring. I have an EditText

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.