To use reflections in simple scenario without any complexities, its better to have an interface "MyInterface" and you wish to invoke a method named "myMethod" which is provided in interface
The class which you get to know at the runtime implements this interface.
-------------------------------------------------
// Sample snippet to give you a brief idea
// Note that I did not compile.
Class [] constructorParamerTypes = null;
// TODO Based on the constructors initialize "constructorParamerTypes" to an array of Classes
Object [] parameters = null;
// TODO Initialize the parameters to the Objects that you wish to pass into the constructor initialization
String className = null; // Class name is known at runtime
// TODO initialize className
Class myObject = Class.forName(className);
// Load the class that has been configured.
Constructor constr = myObject.getConstructor(constructorParamerTypes);
MyInterface instance = (MyInterface) constr.newInstance(parameters);
instance.myMethod();
-------------------------------------------------
Hope this helps