试题详情
单项选择题 11. List list = // more code here  12. Collections.sort(list, new MyComparator());  Which code will sort this list in the opposite order of the sort in line 12?() 

A、 Collections.reverseSort(list, new MyComparator());

B、 Collections.sort(list, new MyComparator()); list.reverse();

C、 Collections.sort(list, new InverseComparator( new MyComparator()));

D、 Collections.sort(list, Collections.reverseOrder( new MyComparator()));

  • D
  • 关注下方微信公众号,在线模考后查看

热门试题