Notice that the reflection Main method differs from the normal method:
this is because of the JDK design problem, the jdk1.4 version is different from the 1.5 version, as follows
Jdk1.4: Publicobject Invoke (Object obj,object[] args), which is byjdk1.4syntax, you need to pass an array as a parameter to theInvokemethod, each element in the array corresponds to a parameter in the called method, and 1.4 goes back and splits the element in the fractional group as an argument.
Jdk1.5 : Public object Invoke (Object Obj,object ... args)
for the JDK backwards compatibility, invoking the Invoke method cannot simply pass in a string array, and it needs to wrap an object array outside. Or a strong turn. The string array is object, so you don't have to split it.
invoke (NULL, new object[]{new string[]{"1", "2"}});
invoke (null, (Object)new string[]{"1", "2"});
Java Basics: The main method of the Reflection class