publicclassThreads1{intx=0;publicclassRunnerimplementsRunnable{publicvoidrun(){intcurrent=0;for(int=i=0;i<4;i++){current=x;System.out.print(current+,);x=current+2;}}}publicstaticvoidmain(String[]args){newThreads1().go();}publicvoidgo(){Runnabler1=newRunner();newThread(r1).start();newThread(r1).start();}}Whichtwoarepossibleresults?()
A.0,2,4,4,6,8,10,6,
B.0,2,4,6,8,10,2,4,
C.0,2,4,6,8,10,12,14,
D.0,0,2,2,4,4,6,6,8,8,10,10,12,12,14,14,
E.0,2,4,6,8,10,12,14,0,2,4,6,8,10,12,14,
第1题:
下列函数原型声明中错误的是( )。
A.void Fun(int x=0,int y=0);
B.void Fun(int x,int y);
C.void Fun(int x,int y=0);
D.void Fun(int x=0,int y);
第2题:
1、要定义整型数组x,使之包括初值为0的三个元素,下列语句中错误的是()
A.int x[3]={0,0,0};
B.int x[ ]={0};
C.int x[3]={0};
D.int x[ ]={0,0,0};
第3题:
要定义整型数组x,使之包括初值为0的三个元素,下列语句中错误的是()
A.int x[3]={0,0,0};
B.int x[ ]={0};
C.int x[3]={0};
D.int x[ ]={0,0,0};
第4题:
下列函数原型声明中错误的是
A.void Fun(int x=0,int y=0);
B.void Fun(int x,int y);
C.void Fun(int x,int y=0);
D.void Fun(int x=0,int y);
第5题:
要定义整型数组x,使之包括初值为0的三个元素,下列语句中错误的是()
A.int x[ ]={0,0,0};
B.int x[ ]={0};
C.int x[3]={0};
D.int x[3]={0,0,0};