@覆盖给出错误日食? [英] @Override gives error in eclipse?

查看:156
本文介绍了@覆盖给出错误日食?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我输入项目在Eclipse工作区中,它在 @覆盖注释给出错误。如果项目有它显示为错误注释任何方法时,我删除它工作正常,但是当我有,有很多注释的重大项目,我应该怎么办解决?

When I import project from workspace in eclipse, it gives error at @Override annotation. If the project has any method that has an annotation it displays as an error and when I remove it works fine, but when I have a major project that has a lot of annotations, what should I do fix it?

推荐答案

你,因为你使用的是Java 1.5不支持@覆盖批注实施覆盖得到错误。进入Eclipse的设置和语言级别设置为1.6。

You're getting the error because you're using Java 1.5 which does not support @Override annotations for implementation overrides. Go into the Eclipse settings and set the language level to 1.6.

编辑 - 更改语言层面转到项目>属性> Java编译器和设置的语言水平有。您可能需要单击要启用项目特定设置。

EDIT - to change the language level go To Project > Properties > Java Compiler and set the language level there. You may need to click to enable project specific settings.

这篇关于@覆盖给出错误日食?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆