Q. What is the index of the last element in an array of length n?
Solution:
Arrays in Java are zero-indexed, meaning the first element is at index 0. For an array of length n, the indices range from 0 to n-1.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.