Black Java wrote:
Hi There,
I'm new to Java. Having read a bunch of books, I wonder if static
variable is initailized by defualt value? Textbooks only indicate that
instance variable is implicitly initailized.
Static variables are actually called class variables in Java.
Section 4.5.5 in the Java Language Specification, 2nd edition, states:
"Each class variable, instance variable, or array component is initialized
with a default value when it is created"
See
<http://java.sun.com/docs/books/jls/second_edition/html/typesValues.doc.html#96595>
for more information.
--
Jonas Kongslund