newinstance in java giving exception
Class integerDefinition = Class.forName("java.lang.Integer");
Constructor intArgsConstructor = integerDefinition.getConstructor(new Class[] {int.class});
Object[] intArgs = new Object[] { new Integer(12) };
Object object = intArgsConstructor.newInstance(intArgs);