...

/

Two Dimensional Arrays

Two Dimensional Arrays

This lesson will briefly explain what Two Dimensional Arrays are and how they are indexed.

Introduction

Arrays can also store references as values. These references can point to anything. They can be a reference to an object or any other data structure. Before we move forward, let’s briefly discuss what pointers are:

  • References are used to explicitly store memory locations that hold a value or an object.

  • Any time you build an object in Java, you basically create a reference to that object.

Two Dimensional Arrays

A Two Dimensional Array is an array of references that holds references to other arrays. These arrays are preferably used if you want to put together data items in a table or matrix-like structure. Matrices are widely used in the field of Game Development, where you are required to store and update the location of the ...