The method process(ItemDetailInfo, Task) of type ItemRuKuUtils must override a superclass method的解决方
来源:互联网 发布:科比安东尼西决数据 编辑:程序博客网 时间:2024/05/16 11:49
在编写java代码的时候,有时候会用到函数的重写,此时就需要在函数头上方写上@Override。
注意:
@Override在jdk1.5之后才有的,也就是jdk1.5以前的以及jdk1.5都不支持@Override。
如果在jdk1.5之前的版本上使用,java虚拟机编译就会报错:
The method process(ItemDetailInfo, Task) of type ItemRuKuUtils must override a superclass method
以下为解决方法(eclipse下):
Window——>preferences——>Java——>Compiler
然后将Compiler compliance level改为1.8
改过之后如下图所示:
这个时候可以看看能不能重写方法,如果还是不行,那么看一下自己所建工程目录下的JRE System Library
显示的版本是否是<=1.5的,如果是,那么就改一下版本。过程如下所示:
1、
2、
OK了,这下就完全搞定了。
对了,要注意重写和重载不一样哦。重写指的是子类重新定义父类的虚函数的做法。而重载,是指允许存在
多个同名函数,而这些函数的参数表不同(或者参数个数不同,或者参数类型不同,或者两者都不同)。
阅读全文
0 0
- The method process(ItemDetailInfo, Task) of type ItemRuKuUtils 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
- 导入项目的时候,提示说@override The method of type must override a superclass method解决方式的错误
- @Override的问题: The method of type must override a superclass method
- The method of type must override a superclass method解决方式
- 解决“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 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解决方式
- 湖南集训 Day4
- 杨辉三角
- SQLSERVER中文乱码问题
- asp简单样例(1)
- 使用AndroidStudio将工具库打成jar包和aar包
- The method process(ItemDetailInfo, Task) of type ItemRuKuUtils must override a superclass method的解决方
- CMD循环
- Netty源码解读Promise
- HDU-1863-畅通工程(最小生成树,prim)
- Objective-c 自定对象 转 JSON
- 《编程珠玑》——第一章习题
- crt连接不上Linux虚拟机
- java设计模式01
- Docker网络之一:Docker 默认网络