Java OCA OCP Practice Question 1233

Question

Consider the following line of code:

int[] x = new int[25]; 

After execution, which statements are true? (Choose all that apply.)

  • A. x[24] is 0
  • B. x[24] is undefined
  • C. x[25] is 0
  • D. x[0] is null
  • E. x.length is 25


A, E.

Note

The array has 25 elements, indexed from 0 through 24.

All elements are initialized to 0.




PreviousNext

Related