Page 917 - AP Computer Science A, 7th edition
P. 917

17. (E) The compareTo method returns an int, so eliminate choices A and B. In the implementation of compareTo, the code segment that applies to the particular example is
if (this.getRow() < p.getRow() || ... return –1;
Since 2 < 4, the value –1 is returned.
































































































   915   916   917   918   919