Where is the implementation of clone() method of Object Class??
Joined: Mar 04, 2005
In the source file Object.java, I only see the following code
Where can I see the implementation code of this method? Or it just can not be seen??
Pls give me a clue, thnx a lot!
SCJP 5.0 - 98% (2007)<br />SCWCD 1.4 - 97% (2007)
Joined: Dec 06, 2001
The keyword "native" means that the implementation is NOT in Java. I would guess it's written in C or C++. As for the answer to your question, I'm not sure where you find the implementation. Perhaps look for an Object.c or Object.cpp file in the source distribution? I've never looked at the source myself, so that's only a guess. I've never worked with native methods, either, so I'm not entirely sure about the details about how the Java source interacts with the native source in C/C++.