← 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?
- A.10
- B.9
- C.11
- 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 →