Which definition of the ColorSorter class sorts the blocks list?

Given:

and the code fragment:

Which definition of the ColorSorter class sorts the blocks list?
A.

B.

C.

D.

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “Which definition of the ColorSorter class sorts the blocks list?

    1. No, you are wrong. As long as compareTo(T o) may contain only 1 argument, the code fragment in B would not compile. So, correct answer is C.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.