2

I am working in Java and am wondering, are multi-dimensional arrays like grids where rows are elements and columns are dimensions, or are they hyper-geometric figures that we can't see?

0

3 Answers 3

8

A 1D array is like a list, a 2D array is like a table with columns and rows, a 3D array is like a cube, x, y and z and anything more than that would be hyper-geometric. You could represent a cube with time with a 4D array.

Sign up to request clarification or add additional context in comments.

Comments

2

Sometimes it's useful to think of multidimensional arrays as geometric: lists, tables, cubes. Other times, such as when the arrays aren't of equal length, it's not. They might be:

  • lists of tables
  • lists of lists of lists
  • tables of cubes

At some (early) point it's time to make some classes.

Comments

1

Depends on how many dimensions you create the array with. Obviously you can create a 2 dimensional array that is a table.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.