Re: Puzzling class field initialization order
Donald McLean <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
My understanding of the Java specification is that you should never
assume that any one thing will be initialized before any other thing. If
you need A to be initialized before B then it is best to do so
explicitly, like in a "static{}" block. This need may preclude declaring
something as final, but ... oh well.
Donald
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com