 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Arrays
are available in Java,
|
|
|
|
– |
But
unlike C and C++, one of Java’s primary goals is
|
|
|
safety.
|
|
|
|
– |
So, a
Java array is guaranteed to be initialized and it
|
|
|
cannot
be accessed outside of its range
|
|
|
|
– |
Range
checking requires a small amount of memory
|
|
|
overhead
on each array as well as index verification at
|
|
run
time.
|
|
|
|
– |
And,
as shown on the previous slide, argument
|
|
|
passing
with arrays are considerably different (look
|
|
|
where
the [] go!)
|
|