Arrays

suggest change

Versions

[{“Name”:“Java SE 1.0”,“GroupName”:null},{“Name”:“Java SE 1.1”,“GroupName”:null},{“Name”:“Java SE 1.2”,“GroupName”:null},{“Name”:“Java SE 1.3”,“GroupName”:null},{“Name”:“Java SE 1.4”,“GroupName”:null},{“Name”:“Java SE 5”,“GroupName”:null},{“Name”:“Java SE 6”,“GroupName”:null},{“Name”:“Java SE 7”,“GroupName”:null},{“Name”:“Java SE 8”,“GroupName”:null},{“Name”:“Java SE 9 (Early Access)”,“GroupName”:null}]

Introduction

Arrays allow for the storage and retrieval of an arbitrary quantity of values. They are analogous to vectors in mathematics. Arrays of arrays are analogous to matrices, and act as multidimensional arrays. Arrays can store any data of any type: primitives such as int or reference types such as Object.

Syntax

Parameters

Parameter | Details| :—— | —— |ArrayType | Type of the array. This can be primitive (int, long, byte) or Objects (String, MyObject, etc).| index | Index refers to the position of a certain Object in an array. | length| Every array, when being created, needs a set length specified. This is either done when creating an empty array (new int[3]) or implied when specifying values ({1, 2, 3}). |

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents