执行了什么,
问题描述:
执行了什么,
importjava.util.Arrays;
publicclass Test {
public static void main(String[] unused) {
String[] str = {"xxx","zzz","yyy","aaa"};
Arrays.sort(str);
intindex=Arrays.binarySearch(str,"zzz");
if(index==-1)
System.out.println("no");
else
System.out.println("yes");
}
}
A)no B) xxx C)0 D) yes
答
importjava.util.Arrays; // 导入util.Arrays类publicclass Test { &nbs...