面试【JAVA基础】其他

1、自定义注解 @target 说明了Annotation所修饰的对象范围: constructor、method、field、package、type等等。 @retention 定义了该Annotation被保留的时间长短, source(源文件保留)、class( class保留)、runtime(运行时有效)。 @inherited 某个被标记的类型是被继承的。一个类标记了带有@inher
相关文章
相关标签/搜索