package reflect;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;
public class Const {
public static void main(String[] args) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// TODO Auto-generated method stub
Class cla=Date.class;
Constructor cu=cla.getConstructor(long.class);
Date d=(Date) cu.newInstance(999999999);
System.out.println(d.toString());
}
}
Mon Jan 12 21:46:39 CST 1970