Getting a Constructor of a Class Object: By obtaining a particular Constructor object. : Constructor « Reflection « Java
- Java
- Reflection
- Constructor
Getting a Constructor of a Class Object: By obtaining a particular Constructor object.
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 });
System.out.println(con);
}
}
Related examples in the same category