摘要: 交换数组中的两个不同元素的位置在Java中,交换数组的两个元素下标位置,必须通过引用来交换。而不能直接进行交换 public class Swap { public static void swap(int[] a, int i, int j) { int t = a[i]; a[i] = a[j] 阅读全文
posted @ 2021-10-07 22:53 热爱代码的某人 阅读(19) 评论(0) 推荐(0)