Java实现按汉语拼音的排序

public class sortByPinyin {
    public static void main(String[] args) {
          String[] arr = { "刘刘", "李飞", "王五", "老三", "贝贝", "啊三" };
          Collator cmp = Collator.getInstance(java.util.Locale.CHINA);
          Arrays.sort(arr, cmp);
          List<String> list = Arrays.asList(arr);
          System.out.println(list);
	}
}
posted @ 2018-06-03 22:19  Birdgeduan  阅读(3873)  评论(0编辑  收藏  举报