网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
classAimplementsRunnable(2.inti;&e
1.classAimplementsRunnable(
2.inti;
3.publicvoidrun()(
4.try(
5.thread.sleep(5000);
6.i=10;
7.)catch(InterruptedExceptione){}
8.)
9.)
10.
11.publicclassTest{
12.publicstaticvoidmain(stringargs[])(
13.try(
14.Aa=newA();
15.Threadt=newThread(a);
16.t.start();
17.
18.intj=a.i;
19.
20.)catch(Exceptione){}
21.)
22.}
Whichstatementalline17willensurethatj=10atline19?()
参考答案
更多 “ classAimplementsRunnable(2.inti;3.publicvoidrun()(4.try(5.thread.sleep(5000);6.i=10;7.)catch(InterruptedExceptione){}8.)9.)10.11.publicclassTest{12.publicstaticvoidmain(stringargs[])(13.try(14.Aa=newA();15.Threadt=newThread(a);16.t.start();17.18.intj=a.i;19.20.)catch(Exceptione){}21.)22.}Whichstatementalline17willensurethatj=10atline19?() ” 相关考题
考题
classAimplementsrunable(2.int&ensp
1.classAimplementsrunable(2.inti;3.publicvoidrun()(4.try(5.thread.sleep(5000);6.i=10;7.)catch(InterruptedExceptione){}8.)9.)10.11.publicclassTest{12.publicstaticvoidmain(stringargs)(13.try(14.Aa=newA();15.Threadt=newThread(a);16.t.start();17.18.intj=a.i;19.20.)catch(Exceptione){}21.)22.)Whichstatementalline17willensurethatj=10atline19?()
考题
下列程序的运行结果是______。 class A implements Runnable { int a; iht i = 2; A(int x) { a = x; } public void run() { while(i > 0) { System.out.println("线程" + a); i--; } } } public class Testl3 { public static void main(String[] args) { Thread a1 = new Thread(new A(1)); Thread a2 = new Thread(new A(2)); a1.start(); a2.start(); } }A.线程1 线程1 线程2 线程2B.线程1 线程2C.线程1 线程2 线程1 线程2D.线程1 线程1 线程1 线程1
考题
11、如果进栈的顺序为e1,e2,e3,e4,则可能的出栈序列是()。A.e3,e1,e4,e2B.e2,e4,e3,e1C.e3,e4,e1,e2D.e1,e2,e3,e4E.e4,e3,e2,e1
考题
如果进栈的顺序为e1,e2,e3,e4,则下列可能的出栈序列是()。A.e3,e1,e4,e2B.e2,e4,e3,e1C.e3,e4,e1,e2D.e1,e2,d3,d4E.e4,e3,e2,e1
考题
如果进栈的顺序为e1,e2,e3,e4,则可能的出栈序列是()。A.e3,e1,e4,e2B.e2,e4,e3,e1C.e3,e4,e1,e2D.e1,e2,e3,e4E.e4,e3,e2,e1
热门标签
最新试卷