Arrays

Arrays are just like other JAVA variables in that they can be assigned different
values, but they are completely unique in that they act like mini-wherehouses of
other variables. They have many 'cells' that you can save values to.

The code to create a one dimentional array is as follows:
array_name = new variable_type[ ]

And a multi-dimentional array just has more brackets after the variable type:
array_name = new variable_type[ ][ ][ ][ ]

(A four-dimentional array)

Remember: all of the cells in a single array have to hold the same type of variable.

Next

Home Page | Table of Contents | Introduction | Programming | Extras