第一种思路: swift: let array1 = NSMutableArray.init(array: [1,2,3,4]) let array22 = NSMutableArray.init(array: []) for index1 in 0..1 ? index*getTotal(index-1) :1; } public staticvoid main(String[] args) { String number[]={"1","2","3","4"}; int total=getTotal(number.length); System.out.println("total="+total); for(int i=0;i