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
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment