‘@Target(ElementType.TYPE) public @interface Controller { String value() default ""; } 对代码说法正确的是?
A.定义了一个名为Controller接口,该接口上可以使用注解
B.注解可以被标记在类上
C.注解可以被标记在方法上
D.注解可以被标记在字段上
正确答案是B
‘@Target(ElementType.TYPE) public @interface Controller { String value() default ""; } 对代码说法正确的是?
A.定义了一个名为Controller接口,该接口上可以使用注解
B.注解可以被标记在类上
C.注解可以被标记在方法上
D.注解可以被标记在字段上
正确答案是B