I need to get a Class from its name, something like this:
public void getClass(String nameOfClass){
Class<?> c = Class.forName(nameOfClass); // Doesn't work
doSomethingWith(c);
}
But the code doesn't work. How can I get a class based on the name?