public class Reflection {
public static void main(String[] args) throws Exception {
Reflection reflection = new Reflection();
System.out.println();
Reflection.class.newInstance().test();
System.out.println();
Reflection.class.getConstructor().newInstance().test();
}
public void test(){
System.out.println("测试成功!!");
}
}