-
P84 获取数组长度length 2020-03-19 21:27:02
-
创建GetArraylength类,首先将某班级所有的人名都存入一个字符串数组,然后调用数组的length属性获取班级总人数.
-
注意: length属性是数组的个数,从1开始计,和索引不同.
-
例一:
public class Dbc_GetArrayLength {
public static void main(String[] args) {
String class1[] =