I am quite new to java and i would like to know how i can create a new instance of a class from a string where the class name is held.
I'm more from a php background and i know that i can do
to create a new instance of it
$var = 'classname';
Currently in my java i have if statements to check the string name and then i do
I'm looking for a more efficient way of doing this than having a if statement for every request that i have
return new ClassName().Execute().toString();
Many thanks in advance