Java OCA OCP Practice Question 1096

Question

What is the value of a[3] as the result of the following array declaration?

int[] a = {1,2,3,4,5};  
  • A. 1
  • B. 2
  • C. 3
  • D. 4


D.

Note

Array indices begin with 0.




PreviousNext

Related