I'm going through the HFJ chapter that deals with staic variables and I have a question about initialization. HFJ gives the following code.
I understand this code and the use of the static initalizer, but I'm confused as to the next block of code.
HFJ states that this second code example will generate a compiler error that
I confused becuase on the previous page they stated that "Defualt values for declared but uninitialized static and instance variables are the same: primitive integers (long, short, etc.): 0 primitive floating point (float, double):0.0 etc..."
So in the case of the second block of code, why is the compiler complaining, should'nt BAR_SIGN be initialized to the default (0.0)?
edited 5/15 - error correction [ May 15, 2005: Message edited by: Bob Beerbower ]