import
java.util.
*
;
import java.text. * ;
public class SortPinyin {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Comparator cmp = Collator.getInstance(java.util.Locale.CHINA);
String[] arr = { " 张三 " , " 张A " , " 李四 " , " 王五 " , " 赵六 " , " F-16 " , " 12345 " , " ^%$% " };
Arrays.sort(arr, cmp);
for ( int i = 0 ; i < arr.length; i ++ )
System.out.println(arr[i]);
System.out.println();
}
}
import java.text. * ;
public class SortPinyin {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Comparator cmp = Collator.getInstance(java.util.Locale.CHINA);
String[] arr = { " 张三 " , " 张A " , " 李四 " , " 王五 " , " 赵六 " , " F-16 " , " 12345 " , " ^%$% " };
Arrays.sort(arr, cmp);
for ( int i = 0 ; i < arr.length; i ++ )
System.out.println(arr[i]);
System.out.println();
}
}