Possible Duplicate:
Dynamically loading a class in Java
hi
i am trying to create a method that gets a String argument, and returns a new Object of the same name. i.e. if the argument is “Mod”, the method will return new Mod();
is there a way to do it without a lot of if statements?
thanks!
With reflection:
Read the corresponding Javadocs to understand what’s going on