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

11. (D) Note that “TOMATO” precedes both “tomato” and “tom”, since “T” precedes “t”. Also, “tom” precedes “tomato” since the length of “tom” is less than the length of “tomato”. Therefore each of the following is true:
strA.compareTo(strB) < 0 strA.compareTo(strC) < 0 strC.compareTo(strB) < 0
So
Choice A is T and F which evaluates to F Choice B is F or F which evaluates to F Choice C is F and T which evaluates to F Choice D is T and T which evaluates to T Choice E is T and F which evaluates to F































































































   903   904   905   906   907