Array sort
作者:互联网
1.
import java.util.Arrays; import java.util.Scanner; public class arrays { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String str=sc.next(); char[] charArray=str.toCharArray(); Arrays.sort(charArray); for(int i=charArray.length-1;i>=0;i--){ System.out.print(charArray[i]+"\t"); } } }
标签:sort,java,Scanner,System,charArray,Array,public,String 来源: https://www.cnblogs.com/resort-033/p/13026799.html