Java Reference
In-Depth Information
• It is a group of similar variables that would be referred by a common name.
• The element available in the array is accessed through index.
• This can be created and may have one or more dimension.
Types of arrays
There are two main types of arrays are.
One-dimensional arrays
Multi-dimensional arrays
One-dimensional Arrays
It's a list of similar types of data. Before you create array you need to create a variable of
any type.
Type variable-name [ ];
Int year_month [ ];
Multi-dimensional Arrays
It is arrays of arrays need to specify each dimensional array variables, additional index using
other square brackets represented as.
Int twoD [ ] [ ] = new int [6] [7];
Search WWH ::

Custom Search