JAVA Chapter 7
For the following code, what would be the value of str[2]?String[] str = {"abc", "def", "ghi", "jkl"};
NOT ghi
Given the following two-dimensional array declaration, which statement is true?int[][] numbers = new int[6][9];
The numbers array has 54 rows. NOT
A partially filled array is normally used ________.
with an accompanying integer value that holds the number of items stored in the array
A ragged array is ________.
a two-dimensional array where the rows have different numbers of columns
If numbers is a two-dimensional array, which of the following would give the number of columns in row r?
numbers.length[r] NOT
Each array in Java has a public field named ________ that contains the number of elements in the array.
size NOT
By default, Java initializes array elements to ________.
0
In Java, you do not use the new operator when you use a(n) ________.
array size declarator NOT
Given that String[] str has been initialized, to get a copy of str[0] with all the characters converted to uppercase, you would use the ________ statement.
str.toUpperCase(); NOT
A(n) ________ is used as an index to pinpoint a specific element within an array.
subscript