Q3

  • I casted a double onto the expression so that the result would be double but looking at it now it is clear that this actually occurs to late, and by choosing option c I divide an int by a double thus already converting the answer to a double

Q5

  • This one was a misclick but the reason this answer is wrong is because it doesnt include all of the params/variables

Q26

  • There are m n iterations of the for loop in code segment I. In code segment II, the outer loop executes m times and the inner loop executes n - 1 times for each iteration of the outer loop. There are m n - m iterations of the inner loop in code segment II, so "A" is printed m more times than "B" is printed.
  • look for deeper explaination

Q31

  • I chose options 1 and 3 but now reviewing I see that 3 wouldnt work because i is representing the element of the array instead of the index

Q38

  • I only chose option 2 but option I is correct too. The code segment uses a for loop to traverse the valueList array. The statement inside the loop calls the get method to access a Value object and then calls the getNum method to access the num instance variable.