College Board MCQ Corrections.

Question: #25 CollegeBoard

The correct answer to this problem would be D, I and II. Choice I shows the reader the height, width, and depth of a box through methods getHeight, getWidth, and getDepth, which allow comparisons to be made in all three dimensions to see if one box can fit inside another box. Choice II is also correct because it gives the user methods smallerHeight, smallerWidth, and smallerDepth notify the reader if one of the boxes are smaller than the other in all three dimensions.

Question: #18 CollegeBoard

The correct answer to this problem would be B, since using Math.random() generates random floating point numbers between 0 and 1, without including 1. C is incorrect because using the statement from C will result in a range between 1 and myList.size().

Question: #38 CollegeBoard

The correct answer to this problem would be A, since the expression will evaluate to true since x is always either greater than 1000 or less than 1500.

Question: #14 CollegeBoard

The correct answer to this problem would be E, since the access that's being used here is the access that would be used if myVehicles was an array and not an ArrayList.

Question: #10 CollegeBoard

The correct answer to this problem would be B, Choice II will eventually cause an ArrayIndexOutOfBoundsException to be thrown when the recursive call is made with target and -1. Choice II is correcyt because Choice I will return the correct value if the element in the array with one element was target.

Question #17 CollegeBoard

The correct answer to this problem would be C, since the size of the array is immutable for option B. When the assignment statement is executed, no values are removed, but copied to the element to the left.