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);
}
}
java基础面试题之String字符串冒泡排序
最新推荐文章于 2023-02-19 03:57:01 发布