为什么在Java中没有@Implements注解? [英] Why there is no @Implements annotation in Java?

查看:401
本文介绍了为什么在Java中没有@Implements注解?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到了 @覆盖注释非常有帮助,而覆盖在我的派生类中一些超级类方法。基本上,编译器检测我的程序缺陷早期这始终是一件好事。但是,为什么没有@Implements注释在Java中?

I have found the @Override annotation very much helpful while overriding some super class methods in my derived classes. Basically the compiler detects the flaws in my program early which is always a good thing . But why there is no @Implements annotation in Java ?

推荐答案

由于您使用 @覆盖通过接口以及定义的方法。

Because you use @Override for methods defined by interfaces as well.

(是的,你是实施,而不是覆盖......但 @覆盖用于两个)

(Yes, you're "implementing" rather than "overriding" ... but @Override is used for both)

这篇关于为什么在Java中没有@Implements注解?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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