单项选择题

Given:
2. import java.util.*;
3. public class Volleyball {
4. public static void main(String[] args) {
5. TreeSet<String> s = new TreeSet<String>();
6. s.add("a"); s.add("f"); s.add("b");
7. System.out.print(s + " ");
8. Collections.reverse(s);
9. System.out.println(s);
10. } }
What is the result

A.Compilation fails.
B.[a, b, f] [a, b, f]
C.[a, b, f] [f, b, a]
D.[a, f, b] [b, f, a]
E.[a, b, f], followed by an exception.
F.[a, f, b], followed by an exception.
题目列表

你可能感兴趣的试题

微信扫码免费搜题