Is it always safe to call getClass() within the subclass constructor?(转)
An article on classloading states that the method
The example they gave was:
However from what I know, the native final method Will calling If so, what are some examples whereby calling |
||||
add a comment
|
Using
You can test it yourself on http://ideone.com/B0nYZ1. The Still, you can use the Also, you are free to use |
http://stackoverflow.com/questions/25561873/is-it-always-safe-to-call-getclass-within-the-subclass-constructor