2

I have an interface which has a OnTaskComplete which takes in a string method and within my class I have

public class JSONActivity extends Activity implements OnRetrieveHttpData

OnRetrieveHttpData being my interface however when I try to override it, it comes back with an error saying

The method onTaskCompleted(String) of type JSONActivity must override a superclass method

here is the code within my class

public class JSONActivity extends Activity implements OnRetrieveHttpData {
 @Override
 public void onCreate(Bundle savedInstanceState){
     super.onCreate(savedInstanceState);
     setContentView(R.layout.activity_json);
 }

 @Override
public void onTaskCompleted(String twitterData) {
    // TODO Auto-generated method stub
}

}

and here is my code within the interface

public interface OnRetrieveHttpData {
    void onTaskCompleted(String twitterData);
}
DorkMonstuh
  • 819
  • 2
  • 19
  • 38

1 Answers1

7

You are using jdk1.5, switch over to jdk 1.6.

In 1.5 you can't use @override for interface methods while in 1.6 you can. This is the issue you are facing.

Lokesh
  • 7,810
  • 6
  • 48
  • 78