摘要: ``` // 冒泡循环 public static void main(String [] args) { int [] ns = {1, 3, 2, 7 ,9}; // 控制循环次数 for (int i = 0; i ns[j+1]) { int tmp = ns[j]; ns[j] = ns[j+1]; ns [j+1] = tmp; } } } System.out.println(Arr 阅读全文
posted @ 2019-10-27 14:18 姜文文 阅读(91) 评论(0) 推荐(0) 编辑