在Java中,以下哪个集合类实现了SortedSet接口? A. HashSet B. TreeSet C. LinkedHashSet D. ArrayList 答案解析 TreeSet是Java集合框架中实现了SortedSet接口的类,它能够保证元素的排序状态。HashSet和LinkedHashSet不保证元素的排序,而ArrayList是一个列表,不是集合。 正确答案:B