This question already has an answer here:
class A {
method x() {
}
method y() {
}
}
class B {
A a = new A();
String methodName = "x";
// I want to execute this statement **a.x();**
}
I know the method name and I want to call the method automatically.
Aucun commentaire:
Enregistrer un commentaire