Solved

Consider the Following Line of Code

Question 28

Multiple Choice

Consider the following line of code:
int[] somearray = new int[30];
Which one of the following options is a valid line of code for displaying the twenty-eighth element of somearray?


A) System.out.println(somearray[28]) ;
B) System.out.println(somearray(28) ) ;
C) System.out.println(somearray(27) ) ;
D) System.out.println(somearray[27]) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions