您的位置:首页 > 职场人生

java基础面试题之String字符串冒泡排序

2018-01-29 22:17 405 查看
package com.tarena.fly;

import java.lang.reflect.Array;
import java.util.Arrays;

/**
* \* Created with IntelliJ IDEA.
* \* User: 武健
* \* Date: 2018/1/29
* \* Time: 20:45
* \* To change this template use File | Settings | File Templates.
* \* Description:String 字符串 冒泡排序
* \
*/
public class Main {
public static void main(String[] args) {
String a = "ajfklasjflkawjeiouwoignasgnaaaa";
char[] chars = a.toCharArray();
Arrays.sort(chars);
String result = new String(chars);
System.out.println(result);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: