Solved

Consider the Following Line of Code

Question 2

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents