一、 选择 A sizeof B abstract C NULL D Native A char='abc'; B long l=oxfff; C float f=0.23; D double=0.7E-3; A The String No.1 is B The String No.1 is C The String No.1 is D 以上都不对 A default B default, zero C error default clause not defined D no output displayed 二、多项选择 A String a[]=new String[5]; for(int i=0;i<5;a[++]=""); B String a[]={"","","","",""}; C String a[5]; D String[5]a; A 0 and 0 B 0 and 1 C 0 and 2 D 0 and 3 A int a[][] = new int[][]; B int a[10][10] = new int[][]; C int a[][] = new int[10][10]; D int [][]a = new int[10][10]; 三、 编程题 以下是答案: |
一、 选择题答案
选择第1题
B
选择第2题
D
选择第3题
A
选择第4题
B
二、多项选择题答案 多项选择第1题 |
三、 编程题答案
编程第1题
public class ArraySort{
public static void main(String args[]){
int array[]={20,10,50,40,30,70,60,80,90,100};
int i,j,k,t;
int l=array.length;
for(i=0;i<l-1;i++)
{
k=i;
for(j=i+1;j<l;j++)
if(array[j] t=array[k];array[k]=array;array=t;
}
for(i=0;i<l;i++)
System.out.println("array["+i+"]="+array);
}
}</l;i++)
</l;j++)
</l-1;i++)
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |