Took the Ch. 11 Practice
Test in the OCA/OCP
Java SE8 Programmer Practice Tests book and just want to understand the logic when thinking through the answer for #34 --
Question 34: How many of the following pairs of values can fill in the blanks to comply with the contract of the hashCode() and equals() methods?
I. 1, false
II. 1, true
III. new Random().nextInt(), false
IV. new Random().nextInt(), true
A. None
B. One
C. Two
D. Three
When looking at the above code where there is only one line for each option, would it always be 'None' because there is no option to return 'false' if a null object is passed in?