关于反射机制的定义

案例无意义、仅仅演示反射机制的初步印象

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);
}
}