eclipse之,重写接口中方法后没有自动添加@Override

1、首先

    今天在写接口的实现类的时候,发现实现类的方法上面没有@override的标签,通过查询发现是由于java Complier选择错误导致的,必须要选择1.6及以上,如下图所示


2、接着有报了一项错误

Java compiler level does not match the version of the installed Java project facet.

通过修改Project Facets的Java值,使之和Compiler compliance level相同:



猜你喜欢

转载自blog.csdn.net/weixin_41586471/article/details/80116838