Advertisements
Advertisements
प्रश्न
Java statement to access the 5th element of an array is:
पर्याय
X[4]
X[5]
X[3]
X[0]
MCQ
Advertisements
उत्तर
X[4]
Explanation:
In Java, array indexing starts from 0, so the 1st element is at index 0, the 2nd element is at index 1, and the 5th element is stored at index 4. Therefore, arrayName[4] is used to access the 5th element.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
