Arrays

This is just a confirmation that Java has arrays. When you see a pair of square brackets like this [ ], it always means you're dealing with an array. The full description of arrays has its own chapter, Chapter 9.

An example array is the set commandline arguments, which is passed to the main() routine as an array of Strings.

void main(String[] args) { /* code */ }

The individual elements in an array can be any type: primitive or reference type. The array as a whole is an object in Java. That means array types are reference types, and an array variable is really a reference to an array object.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.27.251