`
xiuxian1
  • 浏览: 95554 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
文章分类
社区版块
存档分类
最新评论

@Override must override a superclass method

阅读更多
如果你用的是myeclipse 6.0 而且 在使用

@Override 时出现以下错误:

The method XXXXXX   of type XXXXXXXXX must
override a superclass method

那是因为你的Compiler 是jdk1.5,只要把它改为 1.6就可以了

方法:

1. window ->preferences... -> java -> Compiler

2. Compiler compliance level : 6.0

3.Apply

4. ok

5.完成
分享到:
评论

相关推荐

    The method of type must override a superclass method解决方式, myeclipse, java, web

    在Java编程语言中,"The method of type must override a superclass method" 是一个常见的错误提示,它通常出现在子类试图重写父类方法时,但没有按照正确的格式进行。这个错误通常与多态性和继承概念有关,是理解...

    关于java编译过程中的bug说明

    must override a superclass method",并提供相应的解决策略。 这个错误通常发生在尝试覆盖父类的一个方法,但是Java编译器发现该方法的签名并不符合Java的多态性规则。在Java中,子类重写父类的方法时,必须保持...

    ViewPager 放大缩小左右移动

    * This method will be invoked when a new page becomes selected. * Animation is not necessarily complete. * * @param position * Position index of the new selected page. */ public ...

    java异常解决方案.docx

    * java.lang.Error: Unresolved compilation problem: The method contextInitialized(ServletContextEvent) of type CreateDataSourceTableListener must override a superclass method + 解决方案:检查 Servlet ...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    On the other hand, you must include the header file for Foo if your class subclasses Foo or has a data member of type Foo. Sometimes it makes sense to have pointer (or better, scoped_ptr) members ...

Global site tag (gtag.js) - Google Analytics