Fri, May 31, 2019 4:51:43 PM
be accessed outside of its range. The range checking comes at the price of having a small <br/>
amount of memory overhead on each array as well as verifying the index at run time, but the <br/>
assumption is that the safety and increased productivity are worth the expense (and Java can <br/>
sometimes optimize these operations). <br/>
When you create an array of objects, you are really creating an array of references, and each <br/>
of those references is automatically initialized to a special value with its own keyword: null. <br/>
When Java sees null, it recognizes that the reference in question isn�t pointing to an object. <br/>
You must assign an object to each reference before you use it, and if you try to use a reference <br/>
that�s still null, the problem will be reported at run time. Thus, typical array errors are <br/>
prevented in Java. <br/>
You can also create an array of primitives. Again, the compile...