对象容器

对象容器

容器类

容器类有两个类型:

  • 容器的类型

  • 元素的类型

对象数组

String[] a=new String[10];
for (int i=0; i<a.length;i++ ) {
    a[i]=""+i;
}
System.out.println(a[0].length());//1

对象数组中的每个元素都是对象的管理者而非对象的本身。

hash表

Last updated

Was this helpful?