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