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:

Verified
Correct Answer:
Verified
Q23: Which statement is true about the code
Q24: What will be printed by the statements
Q25: What is the output of the following
Q26: Which one of the following statements is
Q27: Suppose you wish to use an array
Q29: What is the output of the following
Q30: Which statement correctly describes the enhanced for
Q31: What should you check for when calculating
Q32: Which one of the following is the
Q33: Assume the method doSomething has been defined