I have an array of class names:
String[] myClasses = { "Hello", "World" };
Is there a way to instantiate a class with the string names ? For example:
public SomeClassType getMyClass(String className) {
???
}
getMyClass("Hello"); // returns an instance of the Hello class
getMyClass("World"); // returns an instance of the World class
ps: obviously without looping through all the strings.
ps: Hello and World both extend SomeClassType