日期:2014-05-20 浏览次数:20864 次
package cn.pb.constructor; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.Calendar; public class Main { public static void main(String[] args) throws SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class cla=Calendar.class; Calendar cal=(Calendar) cla.newInstance(); System.out.println(cal.toString()); } }