66 questions corrections (Final score 53/66)

Question 2

My Answer: C

Correct Answer: A

Explanation: the for loop should have the header i < animals.length and not i < animals[i].length. I cannot be used in the for loop where it is declared to describe the element of the array

Question 6

My Answer: B

Correct Answer: A

Explanation: The variable in question is describing 70% vs 80% in this case. With the 70% case the counter increases twice producing a false result.

Question 7

My Answer: C

Correct Answer: D

Explanation: Recalling the method will not case the error however since the variable is not defined in this method and there is no inheritance you cannot use the al variable in method b.

Question 16

My Answer: B

Correct Answer: C

Explanation: The enhanced for loop is intended to iterate through the entire array not just the column segments so you have to use arr instead of col in the loop.

Question 36

My Answer: A

Correct Answer: C

Explanation: Rock can not be used to find a location since the direction towards the rock is never properly defined.

Question 40

My Answer: C

Correct Answer: B

Explanation: numVals variable needs to be defined as 1 and not 0 in the if statement to work properly and then take 0 as a parameter instead.

Question 41

My Answer: D

Correct Answer: B

Explanation: This method will lead to 12 instead of 11, removing 1 by the first boolean being true will evaluate to 11

Question 48

My Answer: B

Correct Answer: E

Explanation: Using the for loop this way will begin the iteration at 1 returning to few values such as 1, 5, 9 and not 0, 4, 8

Question 51

My Answer: E

Correct Answer: D

Explanation: When X is 25 both of these will return as 23. 22 will cause the methods to return different results.

Question 53

My Answer: D

Correct Answer: A

Explanation: You can not work out this problem without first initializing x to one so that has to be the first step in the problem.

Question 54

My Answer: B

Correct Answer: D

Explanation: The order of the sequence needs to be reversed for there to be no snags in the code, not iterated through alphebetically.

Question 62

My Answer: D

Correct Answer: C

Explanation: The value 9 must be switched for 13 as this sequence will not test if x >= 9 since 9 is not a value

Question 65

My Answer: C

Correct Answer: E

Explanation: The elseif statement breaks at 115 because it will be reevaluating to a compact car when the car is actually mid sized by the following if statement.