Multiple Choice
Code Example Ch 08-1
Assume an int array, values, that is filled to capacity with the following values:
|18 | 9 | 4 | 12 | 2 | 6 | 8 |
-Refer to Code Example Ch 08-1: What will the following statement do? System.out.println(values[7]) ;
A) output 7
B) output 18
C) output nothing
D) cause an ArrayOutOfBoundsException to be thrown
E) cause a syntax error
Correct Answer:

Verified
Correct Answer:
Verified
Q5: An array, when instantiated, is fixed in
Q6: Code Example Ch 08-2<br>Assume you have an
Q7: The class Name consists of 4 instance
Q8: An array index cannot be a float,
Q9: Code Example Ch 08-1<br>Assume an int array,
Q11: Write a method to output all elements
Q12: Which of the following would declare a
Q13: A command-line argument is data that is
Q14: It is possible to sort an array
Q15: A Java main method uses the parameter