Variable Initializations

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]

*Object variables are initialized by their constructors or, in case they are not initialized by the constructor, have following default values:


numerical typescorresponding value of 0
booleanfalse
reference typesnull


 

*Formal parameter variables are initialized by the actual variables provided by the caller.
 
*Local variables (those within blocks) must be initialized before they can be used. This rule is checked for by the compiler and the initializations have to be done in a way which are verifiable by the compiler.
 

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]
Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 11, 2002