Consider the code segment below. Which of the following statements is false? int[] g; g = new int[ 23 ]; Group of answer choices The first statement declares an array reference The second statement creates the array g is a reference to an array of integers The value of g[ 3 ] is -1

Respuesta :

Answer:

In the given statement last line i.e, "The value of g[ 3 ] is -1" is the correct answer.

Explanation:

In the given statement an integer array g is declared, in the next line the size of the array, that is "23" is initialized, in which last option, that is g[3] is equal to -1 is correct, because array indexing always starts with 0, in this array it store integer value, and the wrong option can be described as follows:

  • It is wrong because it is not a reference array.
  • In a second array, it initializes the value.
  • The g is an array name.
ACCESS MORE