Member variables (both static and instance) are initialized implicitly by default:
Most primitives except boolean are default initialized to zero, not null!
boolean variables are default initialized to false, not zero, not null!
Only object references are default initialized to null!
Final varibles must be initialized explicitly in declaration or constructors (instance final variable.)
Local varibles are not initialized
They are not default intialized to anything, unless programmer initialize them explicitly!
It is not compilable if you use them before assign them a value!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment