Invoke a Constructor


import java.lang.reflect.Constructor;

public class Main {
  public static void main(String[] argv) throws Exception {
    Constructor con = java.awt.Point.class.getConstructor(new Class[] { int.class, int.class });
    java.awt.Point obj = (java.awt.Point) con.newInstance(new Object[] { new Integer(123),
        new Integer(123) });
  }
}
Home 
  Java Book 
    Runnable examples  

Reflection Constructor:
  1. Get Constructors and its parameters, modifiers
  2. Get Constructor by parameter type
  3. Invoke a Constructor