Java: Which statement about Two-Dimensional Arrays is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about Two-Dimensional Arrays is the strongest interview answer?

  1. Two-Dimensional Arrays is mostly a naming style choice and has little effect on runtime or design.
  2. In Java, a two-dimensional array is an array of arrays, so each row is its own array object.
  3. Two-Dimensional Arrays exists mainly to reduce the number of Java files in a project.
  4. Two-Dimensional Arrays matters only for frontend frameworks, not for core Java applications.

Hint

Start with the core rule behind Two-Dimensional Arrays.

Answer and rationale

Correct answer: B. In Java, a two-dimensional array is an array of arrays, so each row is its own array object.

In Java, a two-dimensional array is an array of arrays, so each row is its own array object. This is the base concept interviewers commonly test first.

Track: Java