Arrays
What is an array? It is a special data structure available in almost every programming language that allows you to represent a group of similar objects using a single common name.
Imagine you run a shelter for stray animals that has five cats. You may not remember the name of each cat, but each one has a tag with a number that uniquely identifies it. You can think of this as an array named "cats" of size five. Note that indexing starts from zero — this is the convention in Java. Without the possibility to create arrays, you would have to declare five separate variables with different names, which is not very convenient.
In Java, you can create arrays of any dimension — one-dimensional, two-dimensional, three-dimensional, and so on. In this lesson, we will explore all these options.

Please log in or register to have a possibility to add comment.