Java statement to access the 5th element of an array is:

ICSE Class 10 Computer Applications PYQ · 2024 Specimen · Section A

1(x)5 Marks · 2024 · Section A · 2024 Specimen

Java statement to access the 5th element of an array is:

Show SolutionHide Solution↓

X[4]

Reason — Array indexes start from 0. So, X[4] refers to the 5th element of the array.

← Previous questionNext question →

Browse the free Computer Applications sample bank