Java tutorial
public class Main { public static void main(String[] unused) { try { String n = "java.lang.Deprecated"; Class c = Class.forName(n); Class d = Class.forName("java.util.Date"); System.out.println(d.getAnnotation(c)); } catch (Exception ex) { ex.printStackTrace(); } } }