Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12785
  • 博文数量: 8
  • 博客积分: 1505
  • 博客等级: 上尉
  • 技术积分: 90
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-01 23:31
文章分类

全部博文(8)

文章存档

2011年(2)

2010年(6)

我的朋友

分类: Java

2010-05-02 18:08:40

Array Members
The members of an array type are all of the following:

• The public final field length, which contains the number of components
of the array (length may be positive or zero).

• The public method clone, which overrides the method of the same name in
class Object and throws no checked exceptions. The return type of the clone
method of an array type T[] is T[].

• All the members inherited from class Object; the only method of Object that is not inherited is its clone method.

An array thus has the same public fields and methods as the following class:
     class A implements Cloneable, java.io.Serializable {
        public final int length = X;
        public T[] clone() {
           try {
              return (T[])super.clone(); // unchecked warning
           } catch (CloneNotSupportedException e) {
              throw new InternalError(e.getMessage());
           }
        }
     }
阅读(558) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:单词

给主人留下些什么吧!~~