Score
Corrections
Q18
- Question: Assume that myList is an ArrayList that has been correctly constructed and populated with objects. Which of the following expressions produces a valid random index for myList?
- My Answer: (int) ( Math.random () * myList.size () ) + 1
- Correct Answer: (int) ( Math.random () * myList.size () )
- Why I got the Answer wrong: myList are 0 through myList.size() – 1, for a total of myList.size() elements. Using this statement will result in a range between 1 and myList.size().
Q28
- Question: Which of the following is true of method mystery ?
- My Answer: n will sometimes be greater than 2 at // Point C.
- Correct Answer: n will always be greater than 2 at // Point B.
- Why I got the Answer wrong: Im not really sure why i got this wrong, i think i misread the answer
Q34
- Question: Which of the following replacements for /* missing code */ will correctly implement the Circle
constructor?
- My Answer: 2 and 3
- Correct Answer: 2
- Why I got the Answer wrong: I think I traced three wrong, I knew two was right but I just thought 3 was as well