码迷,mamicode.com
首页 > 其他好文 > 详细

Array类型

时间:2018-03-22 17:31:46      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:style   iter   har   obj   reference   for   component   orm   ocs   

 

Chapter 10. Arrays

要明白elementtype与componenttype

There are some situations in which an element of an array can be an array: if the element type is Object or Cloneable or java.io.Serializable, then some or all of the elements may be arrays, because any array object can be assigned to any variable of these types.

 

If an array variable v has type A[], where A is a reference type, then v can hold a reference to an instance of any array type B[], provided B can be assigned to A (§5.2). This may result in a run-time exception on a later assignment; see §10.5 for a discussion.

 

Arrays must be indexed by int values; shortbyte, or char values may also be used as index values because they are subjected to unary numeric promotion (§5.6.1) and become int values.

An attempt to access an array component with a long index value results in a compile-time error.

 

 

 

 

Array类型

标签:style   iter   har   obj   reference   for   component   orm   ocs   

原文地址:https://www.cnblogs.com/extjs4/p/8624368.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!