|
Java™ by example!
|
|
|
How do I instantiate a class given its name as a String?
Use Class.forName and newInstance on the resulting class object. Look at the following example:
Further Information
Author of answer: Joris Van den Bogaert
Comments
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|