0
SubArray = Key.Ikey;
Ikey
是保存方法名称的变量。如何调用使用变量的方法?
我想:
SubArray = Key.(this.IKey);
但是编译器给了错误identifier excpected
。
SubArray = Key.Ikey;
Ikey
是保存方法名称的变量。如何调用使用变量的方法?
我想:
SubArray = Key.(this.IKey);
但是编译器给了错误identifier excpected
。
我想你有兴趣反射。它会是这样的:
method = object.getClass().getMethod(methodName, param1.class, param2.class, ..);
所以你调用该对象“对象”
的变量“方法名”中规定的方法,您可以在这里阅读更多Reflection
,并在本教程中link
所以param1 wouldvbe whats in() –