package com.logicbig.example.clazz;
public class IsAnnotationExample {
public static void main(String... args) {
Class<Deprecated> c = Deprecated.class;
System.out.println("isAnnotation: "+c.isAnnotation());
System.out.println("isInterface: "+c.isInterface());
}
}
Output
isAnnotation: true
isInterface: true
package com.logicbig.example.clazz;
public class IsAnnotationExample2 {
public static void main(String... args) {
Class<Runnable> c = Runnable.class;
System.out.println("isAnnotation: " + c.isAnnotation());
System.out.println("isInterface: " + c.isInterface());
}
}
Output
isAnnotation: false
isInterface: true