Java??????У?java.lang.Object
???????????? ???????[ 2014/5/29 13:22:02 ] ????????Java java.lang.Object
?????????????????Java?и??????????ξ????????????????Java????????λ???????????????м????Java?????
????Java??????????????????漰?????????????????Java?л???????java.lang.Object??????
????Object????Java?????????????????????Object??Java??????????????????????????????Object??????Щ????????????Java??????????????????
????Object??λ??java.lang???У?java.lang????????Java???????????????????????????Object????ж?????????????13?????????????????????????
????1.??????public Object();
????????????£?Java????????? new A(args..)???????????????????????????A??????????A(args..)??????????????????????????????????????????????????е????????ɡ????????????Java?й漲????????????У?????δ???幹????????????????????????????????????????????Object????????????????????????У?δ????Object?????????壬??????????????????????
??????????????????е?????????????????????????????????????е???????????public??
????2.private static native void registerNatives();
????registerNatives?????????native????????Σ?Java?У???native????????ε?????????÷???????????????Java?????????????C/C++????????????????.dll????Java????á?????????????????dll????У?????????????????????????????????native???Σ??????????????????????????Java?????????á????嵽r(nóng)egisterNatives()?????????????????????C/C++?е???????Java?е?native????????????????????
???????????????????????registerNatives()???η??private??????????У????ú?????????????Java????У???????????????н??????ξ??????飺
1 private static native void registerNatives();
2 static {
3 registerNatives();
4 }
3.protected native Object clone() throws CloneNotSupportedException;
|
????????clode()??????????????????native????????????????????clone()??????????Java???????????????????????C/C++?????clone???????"???"?????????????????????????????????????????????????3????????????????????????????????????????????????????????????3????????????????????????????????????????????3????????????μ???Σ???????????????????3??????κι????????????????????????????????????????3??????н??й??????????Java??????????clone??????????????????????????μ?clone?????????????????????????ò???????
??????????clone???????????????????????clone()??????????д?????????
?????????????????????????
1 package com.corn.objectsummary;
2
3 import com.corn.Person;
4
5 public class ObjectTest {
6
7 public static void main(String[] args) {
8
9 Object o1 = new Object();
10 // The method clone() from the type Object is not visible
11 Object clone = o1.clone();
12 }
13
14 }
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11