In a book on Core Java, I found this excerpt :
Think about the way in which the Object class can implement clone. It knows nothing about the objec
Actually, clone() is implemented in native code, so I assume it just does a memory copy (copy all the bytes) without knowing the contents.
clone()
Besides that, there is the Reflection API to gain knowlegde about a class (which would be slower, however).