KnowledgeBoat Logo
|

Computer Applications

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

  1. X[4]
  2. X[5]
  3. X[3]
  4. X[0]

Java Arrays

ICSE Sp 2024

29 Likes

Answer

X[4]

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

Answered By

15 Likes


Related Questions