编写一个能将给定非负整数列表中的数字排列成最大数字的函数。例如,给定[50,2,1,9],最大数字为95021。
public class TestFindMaxNum {
/**
* @param args
* 编写一个能将给定非负整数列表中的数字排列成最大数字的函数。例如,给定[50,2,1,9],最大数字为95021。
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] array = {8,889,89,88889};
findtempNum(array);
}
//获取最大整数
public static String findtempNum (int[] a){
int length = a.le