java吧 关注:1,240,511贴子:12,712,580
  • 0回复贴,共1

两行你们遗忘过的代码实现对中文人名排序及排序结果检验

只看楼主收藏回复

String[] names = {"王飞", "赵伟超", "杨豹", "李振", "刘帝", "刘博"};
Arrays.sort(names, Collator.getInstance(java.util.Locale.CHINA));//升序;
System.out.println(Arrays.toString(names));


1楼2013-07-24 17:01回复