public class Drink implements Comparable { <br /> public String name; <br /> public int compareTo(Object o) { <br /> return 0; <br /> } <br /> } <br /> and: <br /> Drink one = new Drink(); <br /> Drink two = new Drink(); <br /> one.name= “Coffee”; <br /> two.name= “Tea”; <br /> TreeSet set = new TreeSet(); <br /> set.add(one); <br /> set.add(two); <br /> A programmer iterates over the TreeSet and prints the name of each Drink object. What is the result?() <p> public class Drink implements Comparable { <br /> public String name; <br /> public int compareTo(Object o) { <br /> return 0; <br /> } <
A、A. Tea
B、B. Coffee
C、C. Coffee Tea
D、D. Compilation fails.
E、E. The code runs with no output.
F、F. An exception is thrown at runtime.