publicclasstest(privatestaticintj=0;privatestaticbooleanmethodB(intk)(j+=k;returntrue;)publicstaticvoidmethodA(inti)(booleanb:b=i<10|methodB(4);b=i<10||methodB(8);)publicstaticvoidmain(Stringargs[])(methodA(0);system.out.printIn(j);))Whatistheresult?()
A.Theprogramprints“0”
B.Theprogramprints“4”
C.Theprogramprints“8”
D.Theprogramprints“12”
E.Thecodedoesnotcomplete.
第1题:
下面会导致死循环的是()
A.A for(int k=0;k<0;k++)
B.B for(int k=10;k>0;k--)
C.C for(int k=0;k<10;k--)
D.D for(int k=0;k>0;k++)
第2题:
下面哪一个循环会导致死循环?()
A.for (int k = 0; k < 0; k++)
B.for (int k = 10; k > 0; k--)
C.for (int k = 0; k < 10; k--)
D.for (int k = 0; k > 0; k++)
第3题:
下面哪一个循环会导致死循环?()
A.for (int k = 0; k < 0; k++)
B.for (int k = 10; k > 0; k--)
C.for (int k = 0; k < 10; k++)
D.for (int k = 0; k >= 0; k++)
第4题:
下面那一个循环会导致死循环?()
A.for (int k = 0; k < 0; k++)
B.for (int k = 10; k > 0; k--)
C.for (int k = 0; k < 10; k--)
D.for (int k = 0; k > 0; k++)
第5题:
【多选题】下面()会产生死循环 。
A.for (int k = 0; k < 0; k++)
B.for (int k = 10; k > 0; k--)
C.for (int k = 0; k < 10; k--)
D.for (int k = 0; k > 0; k++)