摘要: package cn.rushangw.reflection;public class Test05 { public static void main(String[] args) { A a = new A(); System.out.println(A.m); /* 1.加载到内存,会产生一个 阅读全文
posted @ 2021-06-13 16:30 逆骨111 阅读(38) 评论(0) 推荐(0)
摘要: package cn.rushangw.reflection;import java.lang.annotation.ElementType;public class Test04 { public static void main(String[] args) { Class c1 = Objec 阅读全文
posted @ 2021-06-13 16:08 逆骨111 阅读(66) 评论(0) 推荐(0)
摘要: package cn.rushangw.reflection;//测试Class类的创建方式有哪些public class Test03 { public static void main(String[] args) throws ClassNotFoundException { Person p 阅读全文
posted @ 2021-06-13 15:42 逆骨111 阅读(221) 评论(0) 推荐(0)
摘要: package cn.rushangw.reflection;//什么叫反射public class Test02 { public static void main(String[] args) throws ClassNotFoundException { //通过反射获取类的class对象 C 阅读全文
posted @ 2021-06-13 15:41 逆骨111 阅读(84) 评论(0) 推荐(0)