注解:
1.内建注解
限定重写父类方法:@Override
表示已过时:@Deprecated
抑制编译器警告:@SuppressWarnings
2.元注解:
@Target
@Retention
@Documented
@Inherited
3.自定义注解:
使用@interface关键字
示例:public @interface AnnotationTest{}
1.内建注解
限定重写父类方法:@Override
表示已过时:@Deprecated
抑制编译器警告:@SuppressWarnings
2.元注解:
@Target
@Retention
@Documented
@Inherited
3.自定义注解:
使用@interface关键字
示例:public @interface AnnotationTest{}