题解 | 字符串排序

字符串排序

https://www.nowcoder.com/practice/d2f088e655d44e4a85c16f7b99126211

import java.util.Scanner;
import java.util.Arrays;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char [] array = scanner.nextLine().toCharArray();
        Arrays.sort(array);
        System.out.println(new String(array));
    }
}

全部评论

相关推荐

程序员小白条:不是哥们,晚了差不多半年多才来找工作啊你得有更强的学历和技术,才能有这种资本啊,现在基本都得1-3年的吧,你这就三个月实习了,而且写的这么模糊
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务