When an array of objects is instantiated, objects within the array are not instantiated automatically, but all the references get the default value of null.
When an array of primitives is instantiated, elements get default values.
Instance variables are always initialized with a default value.
qLocal/automatic/method variables are never given a default value. If you attempt to use one before initializing it, you'll get a compiler error
English Premier League
Bundesliga
La Liga
Showing posts with label Using a Variable or Array Element That Is Uninitialized and Unassigned. Show all posts
Showing posts with label Using a Variable or Array Element That Is Uninitialized and Unassigned. Show all posts
1:12 PM
Using a Variable or Array Element That Is Uninitialized and Unassigned
Friday, August 21, 2009
Subscribe to:
Posts (Atom)

