解决“The method XXXXXX of type XXXXXXXXX must override a superclass method”
来源:互联网 发布:数据分析怎么做 编辑:程序博客网 时间:2024/06/08 01:44
我的Eclipse版本是3. 6.1
@Override 时出现以下错误:
The method XXXXXX of type XXXXXXXXX must
override a superclass method
上网搜索原来原因是:
实现类里面使用了 @Override,那么在JDK1.5下要使用@Override 这个annotation 必须保证 被标注方法来源于class 而不是interface,
即The method of type must override a superclass method,提示的是实现类必须实现接口的方法。
解决方法:
将项目的jdk从1.5改为1.6
我就按如下步骤:
1. window ->preferences... -> java -> Compiler
2. Compiler compliance level : 1.6
查看发现设置是1.6,并非1.5,我很疑惑, 后来才发现原来是必须是将项目的JDK1.5改为1.6,关键是“项目”两个字,
我就点击“window ->preferences... -> java -> Compiler ”页面右上角的“Configure Project Specific Setttings...”,
选择你的工程项目就可以了。
原来如此。
- 解决“The method XXXXXX of type XXXXXXXXX must override a superclass method”
- The method of type must override a superclass method 解决
- The method of type must override a superclass method解决方法
- The method *** of type ** must override a superclass method
- The method *** of type CourseServiceImpl must override a superclass method
- android The method of type must override a superclass method
- eclipse:the method of type must override a superclass method
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method 解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method 解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method解决方式
- The method of type must override a superclass method解决方式
- VIM插件管理工具Vundle安装
- System.Web.Routing 3.5 MatchContentPathSegment BUG
- Android中dp和px之间进行转换
- 使用引用计数扩展c语言实现内存自动管理的思考 -- 为什么存在内存泄露
- 作为软件工程师,你必须知道的20个常识
- 解决“The method XXXXXX of type XXXXXXXXX must override a superclass method”
- 用VC6 进行Android NDK 开发
- DB2 备份恢复
- Linux中添加静态路由的方法(临时的和永久的)
- Learn Python The Hard Way学习(38) - 列表操作
- 类似switch的条件语句ps(case)
- asp.net中Jquery解析json数据格式
- el表达式获取jsp页面超连接参数的值
- Erlang/OTP并发编程实战