java中创建数组的方法:声明数组名开辟空间并赋值,如【int[] arr;arr = new int[]{1,2,3, …};】。还可以在声明数组时指定元素个数,然后赋值,如【int[] arr1= new int[3];】。
技术文章 / 下载软件趣味内容 / 专业带飞