public class MaoPao { public static void main(String[] args) { int[] array={1,2,5,6,3,6,8,9}; for (int i = 0; i array[j+1]){ flag=array[j]; array[j]=array[j+1]; array[j+1]=flag; } } } System.out.println(Arrays.toString(array)); } }
欢迎分享,转载请注明来源:内存溢出
public class MaoPao { public static void main(String[] args) { int[] array={1,2,5,6,3,6,8,9}; for (int i = 0; i array[j+1]){ flag=array[j]; array[j]=array[j+1]; array[j+1]=flag; } } } System.out.println(Arrays.toString(array)); } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)