找考题网-背景图
未分类题

下面是一个Java的应用程序,其输出结果是
public class Testll{
public static void main (String args[])
{char c='i';
for(int n;6;n<11;m + +)
{ if(n = =8)continue;
System.out.print(c + +);
A.ij
B.ijk
C. ijkl
D.ijklm

A.out.print(c
B.ij
B.ijk
C.
C.ijklm


【参考答案】

C
解析:continue语句跳出循环体中下面尚为执行的语句,回到循环体的开始继续执行下一轮的循环。如果换成break关键字,执行结果是ij,读者自己试试看。
热门试题

未分类题Broadly speaking, the Englishman is a quiet, shy, reserved person who is fully (1)_____ only among people he knows well. In the presence of strangers or foreigners he often seems inhibited, (2)_____ embarrassed. You have only to (3)_____ a com muter train any morning or evening to see the truth of this. Serious-looking businessmen and women sit reading their newspapers or dozing in a corner; no one speaks. In fact, to do so would seem most usual. (4)_____, there is here an unwritten but clearly understood code of behavior. which, (5)_____ broken, makes the person immediately the object of (6)_____. It is a well-known fact that the English have a (7)_____ for the discussion of their weather and that, given half a chance, they will talk about it (8)_____. Some people argue that it is because English weather (9)_____ forecast and hence is a source of interest and (10)_____ to everyone. This may be so. (11)_____ Englishmen cannot have much (12)_____ in the weathermen, who, after promising fine, sunny weather for the following day, are often proved wrong (13)_____ a cloud over the Atlantic brings rainy weather m all districts! The man in the street seems to be as accurate—or as inaccurate—as the weathermen in his (14)_____. The overseas visitors may be excused for showing surprise at the number of references (15)_____ weather that the English make to each other in the course of a single day. Very often conversational greetings are (16)_____ by comments on the weather. 'Nice day, isn't it?' 'Beautiful!' may well be heard instead of 'Good morning, how are you?'. (17)_____ the foreigner may consider this exaggerated and comic, it is worthwhile pointing out that it could be used to his advantage. (18)_____ he wants to start a conversation With an Englishman but is (19)_____ to know where to begin, he could do well to mention the state of the weather. It is a safe subject which will (20)_____ an answer from even the most reserved of Englishmen.A.entertainedB.relaxedC.amusedD.enlightened