题目内容
(请给出正确答案)
[多选题]
在Java语言中如下定义:int()a=newint;则对a数组元素的正确引用是(选两项)
A.[10]
B.a[3+1]
C.a(5)
D.a[0]
答案
BD
A.[10]
B.a[3+1]
C.a(5)
D.a[0]
BD
第1题
A.int a[5];
B.int a[]=new[5];
C.int a[];int a=new int[5];
D.int a[]={1,2,3,4,5};
第2题
A.int
B.double
C.float
D.char
第7题
Java语言中数值数据的类型能自动转换,按照从左到右的转换次序为()。
A.byte→int→short→long→float→double
B.byte→short→int→long→float→double
C.byte→short→int→float→long→double
D.short→byte→int→long→float→double
第8题
A.0x1234
B.0x4312
C.0x12
D.0x34
第10题
在C语言中,int,char和short三种类型数据在内存中所占用的字节数()。
A.由用户自己定义
B.均为两个字节
C.是任意的
D.由所用机器的机器字长决定