案例无意义、仅仅演示反射机制的初步印象
import java.lang.reflect.Method;
public class ReflectionDemo01 {
public static void main(String[] args) throws Exception {
Class<?> classType = Class.forName("java.lang.Integer");
Method[] methods = classType.getDeclaredMethods();
for (Method method : methods)
System.out.println(method);
}
}
My New Blog : http://blog.fdlife.info/
The more you know, the less you believe.