给大家分享几个容易做错的题:
1.以下语句有语法错的是: A
A.int x=1; y=2; z=3 B.for (int x=10,y=0; x>0; x++);
C.while (x>5); D.for(; ;);
2.下面程序哪个语句是正确的: C
A. byte a=0,b=3; byte c =a+b; B. short s =23; s=s+12;
C. short s=23; s+=12; D. float f = 23+23.23;
3.下面数组定义正确的是: A
A. int [] arr ={23,45,65,78,89}; B. int [] arr=new int[10]{};
C. int [] arr=new int[4]{3,4,5,6}; D. int [] arr={"a",23 ,45,6};
|
|