当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
Java中数组的成员
发布时间:2010/5/13 11:27:54 来源:城市学习网 编辑:ziteng
  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<T> 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());
  }
  }
  }
广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved