问题 填空题

下面程序段的输出结果是______。
publicclassTest
publicstaticvoidmain(Stringargs[])
inti=1;
switch(i)
case0:
System.out.println("0");
break;
casel:
System.out.println("1");
case2:
System.out.println("2");
break;
default:
System.out.println("default");


答案

参考答案:L

解析: 本题考查switch-case-break的用法。每个分支语句后面必须有break语句,否则程序向下执行,直到遇到break语句或程序结束。所以该题i=1时执行casel分支语句,而easel分支语句后没有break语句,程序继续向下执行case2分支语句, case2语句后有break语句,故程序不执行default分支语句。

完形填空
Jenny, from Germany, spent some time traveling in India. While she was there, she stayed with her Indian friend, Leela. However, there was a language barrier(障碍) for her there. It was very   31  for her to communicate in the new environment, which was very different from  32  of her own country.
One day, together with Leela, Jenny went to   33  an orphanage(孤儿院). All the children there were very young. At first, Jenny was not sure if she could have a way to communicate with them. She went over to the children   34  and sat beside them. After some time, one of the children    35  her. She felt a little relaxed and smiled back. Then she went close to the child. She slowly put her arm around the child and started   36   a song in German. The child kept smiling and started repeating the words after her. The words that came from the little mouth were different from those that Jenny sang, but the rhythm(节奏) was the same. Jenny sat a little more and the child followed her again. Wanting to join in the   37 , another child went up to Jenny and started singing the rhythm. Then more children joined. They   38  many smiles together.
From the other side of the hall, Leela was smiling and watching them. Noticing Leela’s 39  on her, Jenny had an exciting feeling from her heart: “See, I don’t have any language barriers here. We   40  speak and communicate!” At that moment, she understood: we’re all simple human, and we have the ability to connect with each other.
小题1:
A.niceB.dangerousC.difficultD.easy
小题2:
A.theseB.thoseC.thisD.that
小题3:
A.showB.visitC.buildD.improve
小题4:
A.slowlyB.earlyC.hardlyD.easily
小题5:
A.looked atB.laughed atC.shouted atD.smiled at
小题6:
A.singingB.writingC.sayingD.playing
小题7:
A.clubB.talkC.funD.dance
小题8:
A.forgotB.rememberedC.sharedD.missed
小题9:
A.handsB.eyesC.influenceD.question
小题10:
A.canB.mustC.needD.should
选择题