看看代码,简单的问题,150分 public static void swap(int[] i,int[]j) { int temp[]=new int[1]; temp=i; i=j; j=temp; }试试 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 public static void swap(int[] i,int[]j) { for(int index = 0; index < i.length; index++) { int temp = i[index]; i[index] = j[index]; j[index] = temp; } } public static void swap(int[] i,int[]j) { for(int index = 0; index < i.length; index++) { int temp = i[index]; i[index] = j[index]; j[index] = temp; } } 谢谢,行了,helpall解释一下好吗,我得为什么不行 i和a指向同一个数组X,j和b指向同一个数组Y. 你的方法又让i和j指向新的数组,就没有用了.fcpanda()的方法让i指向数组Y,j指向数组X,但外部的a和b是不会变的. hibernate 时间问题 毫秒 初学者的困惑 如何画带一两个洞的多边形啊? 用POI在excel中导入数据时,为什么只能导入3000多字节 这个问题我一点思路也没有..... 发布Mysql数据库应用程序 求教 汉字转日文(平假名) 请问,怎样将字符串转换成为数组 配置JSP环境的问题 简单的布局问题,就是不起作用。 写文件文件问题! 哪位大侠能给个FTP的源代码?急用!!!
{
for(int index = 0; index < i.length; index++) {
int temp = i[index];
i[index] = j[index];
j[index] = temp;
}
}
{
for(int index = 0; index < i.length; index++) {
int temp = i[index];
i[index] = j[index];
j[index] = temp;
}
}
fcpanda()的方法让i指向数组Y,j指向数组X,但外部的a和b是不会变的.