package candy; import java.lang.reflect.Constructor; /** * Sam plays with candy to learn some useful stuff. */ public class SamTest { public static void main(String[] args) throws Exception { Object o = new String(); Constructor c = o.getClass().getConstructor(new Class[0]); Object p = c.newInstance(new Object[0]); System.err.println("o: " + o); System.err.println("p: " + p); } // main(String[]) } // class SamTest