1.数组的定义:
int[] a = {1,2,3,4};
int[] a = new int[4];
int[] a = new int[]{12,3,4};
2.数组的常用方法:
a.length; ------>数组的长度
Arrays.toString(a); ----->将数组转换成字符串
posted on 2018-07-02 15:52 Terlong 阅读(71) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3