Java – this method must override the superclass method

I recently updated my computer to Ubuntu 11.10 64 bit I had a problem importing the project and it gave me an error

"Onview() method must override superclass method."

I read in other posts that the error should be using java 1.5, but Ubuntu 11.10 comes with open-6-jdk

Any solution ideas?

Solution

It sounds like your project's JDK compliance level is set to 1.5 (the version of Java installed on your computer only determines how high you can set the compliance level.) You can check in eclipse by opening the project properties (right - click the project name and select properties) and selecting Java The compiler is on the left

In Java 1.6, the @ override annotation can (and should) be used for methods defined in implemented interfaces Java 1.5 does not allow this

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>