摘要: 一. 二维数组遍历 package test_1; public class test_7 { public static void main(String[] args) { int[][] arr = {{1,2,3},{5,6},{12,13,14}}; for(int i=0; i< arr 阅读全文
posted @ 2020-05-10 19:40 雨曼晴川 阅读(88) 评论(0) 推荐(0)
摘要: package test_1;//取反public class test_4 { public static void main(String[] args) { int[] arr = {11,22,33,44,55}; reverseArray(arr); //调用取反方法 print(arr) 阅读全文
posted @ 2020-05-10 18:25 雨曼晴川 阅读(1110) 评论(0) 推荐(0)
摘要: int[] arr= new int[5]; 数据类型 [] 数组名 = new 数据类型【数组长度】;左边: int 数据类型[ ] :代表的数组,几个中括号代表几维数组arr: 合法的标识符右边:new: 创建一个新的实体或对象int:数据类型[ ]:代表数组5:代表数组的长度 package 阅读全文
posted @ 2020-05-10 17:34 雨曼晴川 阅读(174) 评论(0) 推荐(0)