`
y806839048
  • 浏览: 1134603 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

@Override must override a superclass method 问题解决

 
阅读更多

@Override must override a superclass method 问题解决

 

如果在使用Eclipse开发Java项目时,在使用 @Override 出现以下错误:
The method *** of type *** must override a superclass method

主要是因为你的Compiler是jdk5,(5不支持@Override等形式的批注)只要把它改为6就可以了。
方法:将window->preferences->java-compiler中的Compiler compliance level修改为6.0。    
分享到:
评论

相关推荐

    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中,子类重写父类的方法时,必须保持...

    java异常解决方案.docx

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

    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 ...

    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