- P(gun)]
JavaPԇ֪R(sh)c(din)\
JavaṩObject^P(gun)ϵͬһõĘ(sh)ObjectObject(qing)(jng)(hu)ʹõСռJavaPԇ֪R(sh)c(din)ϣJ(rn)x!
1.@Class(du)Nʽ
// 1. (j)o(li)@ d
String classname = "cn.itcast.reflect.Person";// (li)ļ
Class clazz = Class.forName(classname);// ˌ(du)Person.class
// 2. õˌ(du)֪ʲô ګ@Ì(du)
Object obj = new Person();
Class clazz1 = obj.getClass();// @Ì(du)w
// 3. _ث@ij(g)Class(du) Ҫڂ
Class clazz2 = Person.class;
һJava(chung)(du)ĎNʽ
(1) newZ(y)䄓(chung)(du)@Ҋ(jin)Ą(chung)(du)ķ
(2) \(yn)÷ֶ,{(dio)java.lang.Classjava.lang.reflect.ConstructornewInstance()(sh)
(3) {(dio)Ì(du)clone()
(4) \(yn)÷лֶ{(dio)java.io.ObjectInputStream(du) readObject()
(1)(2)(hu)_@ʽ{(dio)Ø(gu)캯(sh) ;(3)ڃ(ni)ό(du)Ќ(du)ӰӡԲ(hu){(dio)Ø(gu)캯(sh) ;(4)Ǐļ߀ԭČ(du)Ҳ(hu){(dio)Ø(gu)캯(sh)
2.Java׃Ϸ
$ ĸ_(ki)^Ŀǔ(sh)֡ĸ;Ԕ(sh)_(ki)^JavaP(gun)I
3.
abstractstaticnativesynchronized
nativeطoϵy(tng)ȥ(sh)F(xin)JNI{(dio)Õr(sh)ʹ
4.oB(ti)׃Main(sh)
Main(sh)пֱʹstatic׃ֱʹ÷oB(ti)׃ʹ÷oB(ti)׃Ҫnew(du)ʹ
oB(ti){(dio)÷oB(ti)ķ׃(ѽ(jng)ڵĖ|߀ڵĖ|);oB(ti)ֱ{(dio)oB(ti)׃ҽoxֵڷoB(ti)жxoB(ti)׃;
5.L(wn)(qun)(ⲿ)
(1)publicԱL(wn)(all)
(2)privateֻܱԼL(wn)ġ
(3)protectedͬһ(g)L(wn)
(4)default(ĬJ(rn))ͬһеL(wn)r(sh)](mi)мJ(rn)friendly
6.Java^еĘ(gu)췽
(1)Ę(gu)^(gu)б{(dio)Ę(gu)췽
(2)ԼĘ(gu)췽ʹsuper(argument_list){(dio)ûĘ(gu)췽
2.1ʹthis(argument_list){(dio)ñ☋(gu)췽
2.2{(dio)super회(xi)(gu)췽ĵһС
(3)Ę(gu)췽Л](mi)@ʾ{(dio)ûĘ(gu)췽tϵy(tng)ĬJ(rn){(dio)ûğo(w)(sh)(gu)췽
(4)(gu)췽мț](mi)@ʾ{(dio)û(gu)췽֛](mi)Пo(w)(sh)Ę(gu)췽tge(cu)
JavaPԇ֪R(sh)c(din)P(gun)£
СZ(y)ij֪R(sh)c(din)06-30
xСZ(y)ij֪R(sh)c(din)R07-29
СZ(y)ij֪R(sh)c(din)R02-01
СW(sh)֪R(sh)c(din)06-24
Сtlj(mng)֪R(sh)c(din)06-26
ӛС֪R(sh)c(din)06-25
ǻ(zh)I(y)t(y)c(din)֪R(sh)c(din)03-26
СW(xu)ӢZ(y)40(g)֪R(sh)c(din)03-10
2017пӢZ(y)Z(y)֪R(sh)c(din)50(g)08-18
2016п֪R(sh)c(din)w{01-23