Once you get the Class object it can be used to create an instance of the class.
Have you looked at the tutorial:
http://docs.oracle.com/javase/tutorial/reflect/index.html
Type: Posts; User: Norm
Once you get the Class object it can be used to create an instance of the class.
Have you looked at the tutorial:
http://docs.oracle.com/javase/tutorial/reflect/index.html
The same as when any object is created and its value assigned to a variable.
The reference variable can be added to an arraylist.
The code at the link used reflection to call a method named in a String. Not exactly what you are trying to do, but related: using a String's contents to call an object's method.
Do a Search for...
The class definition must exist before you can create an instance of it. The reflection package classes allow you to use a String to do that.
There is an example of a reflection class usage...
Look at the classes in the java.lang.reflect package. They have methods for using Strings to access objects and call methods.