下列代码中哪行有错误?publicclassTest{publicstaticvoidmain(Stringargs[]){char c=65535;byteb=127;int height=100;float f=3.14;}}
A. char c=65535;
B. byteb=127;
C. int height=100;
D. float f=3.14;
查看答案
下列代码中哪行有错误?publicclassTest{publicstaticvoidmain(Stringargs[]){int m='a';unsigned char x='m';char ch=97;double t=0.1;}}
A. int m='a';
B. unsigned char x='m';
C. char ch=97;
D. double t=0.1;
以下哪种类型变量占用的内存最多?
A. int
B. float
C. double
D. char
对于int[][] a={{1,2},{1,2,3},{1,2,3,4}};下列哪个叙述是错误的?
A. a.length的值是3
B. a[2].length的值是4
C. a[0][1]的值是1
D. a[2][0]的值是1
执行下列代码,系统输出的结果为:public class Test{public static void main(String[] args){int x = 5;boolean b1 = true;boolean b2 = false;if((x==4) && !b2)System.out.print("1 ");System.out.print("2 ");if((b2=true) && b1)System.out.print("3 ");}}
A. 2
B. 3
C. 1 2
D. 2 3
E. 1 2 3
F. 编译期错误