QUESTION 1 An is an object that can store a group of values
QUESTION 1
An _ is an object that can store a group of values.
10 points
QUESTION 2
The first subscript in an array is numeric value _.
0
1
10 points
QUESTION 3
You have the following array structure, and you attempt to access subscript 10. What happens?
int [] theArray = new int[5];
Random gibberish will appear on the output
Java throws an exception due to the Array Bounds
Java displays whatever is in memory at position 10
Java resizes the array to 10.
10 points
QUESTION 4
All Java arrays have a _ property. This holds the number of elements in the array.
10 points
QUESTION 5
Java allows you to use an integer variable to specify an array\'s size declaration.
True
False
10 points
QUESTION 6
To copy the contents of Array1 to Array2, the programmer must_.
create a new array and use the Array.Copy method.
assign Array2 to Array1 like this Array2 = Array1.
create an entire new array and manually reassign the contens
copy each value in Array1 into Array1, preferably using a for loop
10 points
QUESTION 7
When you pass an array into a method, a(n) _ the array is passed into the method.
a new version of
address reference to
actual values of
copy of
10 points
QUESTION 8
This is valid, working Java code.
String[] names = {\"Kate\", \"Leonardo\", \"Denzell\", \"Michelle\"};
String[] moreNames = {\"Kate\", \"Leonardo\", \"Denzell\", \"Michelle\"}
if(names == moreNames){
System.out.println(\"Arrays are the same\");
}
True
False
10 points
QUESTION 9
To find the largest value in an array requires using a(n) _ statement within the for loop.
while
do
if
switch
10 points
QUESTION 10
You wish this method to return an integer array. Fill in the missing punctuation.
public static int_ theMethod(){
int theArray[] = {1, 2, 3, 4, 5};
return theArray;
}
10 points
QUESTION 11
You cannot create an array of a class that you build.
True
False
10 points
| 0 | ||
| 1 | 
Solution
Question 1:
Answer:array
Question 2:
Answer:0
Question 3:
Answer:Java throws an exception due to the Array Bounds
Question 4:
Answer:length
Question 5:
Answer:True
Question 6:
Answer:copy each value in Array1 into Array1, preferably using a for loop
Question 7:
Answer:address reference to
Question 8:
Answer:True
Question 9:
Answer:if
Question 10:
Answer:public static int[] theMethod()
Question 11:
Answer: False. we can create an array of a class that we build.



