4
我需要打印这个双数组,但我不断收到最后一行“索引”的错误,它说“不能将double转换为int”。如何打印双数组?
double[] i1 = new double[] {0.15, 0.875, 0.375};
Arrays.sort(i1);
System.out.print("1st array : ");
for(double index=0; index < i1.length ; index++)
System.out.print(" " + i1[index]);
我明白了。谢谢!! – agentmg123