🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Java Arrays: all 10 questions

Quiz: Java Arrays · Question 2 of 10

What is the last valid index of an array with length 10?

What is the last valid index of an array with length 10?

  1. A.10
  2. B.9
  3. C.11
  4. D.1
Answer & explanation

Correct answer: 9

Indexes start at 0, so the last one is length − 1 = 9.

Can you get the rest right without peeking?

Take the timed Quiz: Java Arrays quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →