摘要: int[] is = new int[1,12,4,546]for(int i=0; i<is.length; i++){ System.out.println(int[i] + "");}这就是一个最简单的遍历数组,遍历数组通俗点就是说把数组中的每个数都读一遍(部分有if条件+break的则可能不 阅读全文
posted @ 2018-03-25 21:07 胖不胖见面说 阅读(799) 评论(0) 推荐(0) 编辑
摘要: 例子: int[] arrays = new int[]{2,5,8,3,5,9,2,6}; // 创建直接选择排序类的对象 chapter6Arry sorter = new chapter6Arry(); // 调用排序方法将数组排序 sorter.sort(arrays); } public 阅读全文
posted @ 2018-03-25 21:02 胖不胖见面说 阅读(464) 评论(0) 推荐(0) 编辑