关于#eclipse#的问题:编写方法void fun(StringBuilder str),对长度为n个字符的字符串,将其余n-2个字符按ASCII码降序排列

编写方法void fun(StringBuilder str),对长度为n个字符的字符串,除首、尾字符外,将其余n-2个字符按ASCII码降序排列。例如,CEAedca排序后 CedcEAa。main方法中测试fun方法功能。

把字符串转换成字符数组char[ ],然后冒泡排序