Possible Duplicate:
How do I invoke a java method when given the method name as a string?
How do I programmatically compile and instantiate a Java class?
I have a function:
fun1() {
System.out.print("hello");
}
I want to read a string from either the user or a file, and if the string "fun1()"
appears, I'd call fun1.
I don't want to do this with a switch statement, because I have a lot of functions.
There is any way to call a function using strings?