package com.logicbig.example.field;
import java.lang.reflect.Field;
public class IsAnnotationPresentExample3 {
private static class Test {
@Deprecated
private String str;
}
public static void main(String... args) throws NoSuchFieldException {
Field f = Test.class.getDeclaredField("str");
boolean b = f.isAnnotationPresent(Deprecated.class);
System.out.println(b);
}
}