[jdom-interest] Moving Children
arosen at silverstream.com
Fri Jun 15 13:16:59 PDT 2001
> Maybe I'm completely confused (it has been a long night)
> but if you call :
> won't that result in a call to the actual overridden clone() in the
> actual class of whatever?
No, it will give you a compiler error. No matter what object "whatever" is at
runtime, you're calling it as an Object, and Object.clone() is protected.
Sun has acknowledged that clone() is screwed up. No matter what you try, you
can't clone an object unless you know its type beforehand (at compile-time).
More information about the jdom-interest