首页  |  繁体  |  代码下载  |  网络学院  |  旧版网络学院  |  手机学院
您的位置:首页 -> 软件学堂 ->认证考试 -> SCJP认证套题解析之六

SCJP认证套题解析之六

时间:2010-01-14 02:03 全文阅读 打印
温馨提示:您正在浏览的是 SCJP认证套题解析之六 的内容,您可以在下面的搜索框中搜索到更多关于 SCJP认证套题解析之六 的文章 。

26、Which of the following statements about declaration are true?
   A. Declaration of primitive types such as boolean, byte and so on does not allocate memory space for the variable.

   B. Declaration of primitive types such as boolean, byte and so on allocates memory space for the variable.

   C. Declaration of nonprimitive types such as String, Vector and so on does not allocate memory space for the object.

   D. Declaration of nonprimitive types such as String, Vector ans so on allocates memory space for the object.

   (ad)

   题目:下面的有关声明的哪些叙述是对的。
   A. 对原始数据类型例如boolean,byte的变量的声明不会为该变量分配内存空间。

   B. 对原始数据类型例如boolean,byte的变量的声明将为之分配内存空间。

   C. 非原始数据类型例如String,Vector的变量的声明不会为该对象分配内存。

   D. 非原始数据类型例如String,Vector的变量的声明会为该对象分配内存。

   对原始数据类型的变量的声明将为之分配内存并赋予一个缺省值,参见23题的叙述,而非原始数据类型的变量必须用new Xxxx()分配内存及初始化。但是严格来讲此题的答案有待确定,因为只有原始类型的实例变量和类变量的声明在类对象被创建/类被加载时完成内存的自动分配,而原始类型的局部变量必须显式初始化,从这点来看原始类型的局部变量没有被自动分配内存,SL275中只
分页:[1]   2   3   4   
温馨提示:您可以点击下面的全文阅读链接阅读SCJP认证套题解析之六全文,您还可以点下面的打印链接打印SCJP认证套题解析之六全文 。
相关文章
 
相关随机文章
 
最新文章