试题详情
单项选择题 import java.util.*;  public class LetterASort {  public static void main(String[] args) {  ArrayList strings = new ArrayList();  strings.add(‟aAaA”);  strings.add(”AaA”); strings.add(‟aAa”);  strings.add(”AAaa”);  Collections.sort(strings);  for (String s: strings) { System.out.print(s + “ “); }  }  }  What is the result?() 

A、 Compilation fails.

B、 aAaA aAa AAaa AaA

C、 AAaa AaA aAa aAaA

D、 AaA AAaa aAaA aAa

E、 aAa AaA aAaA AAaa

F、 An exception is thrown at runtime.

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

热门试题