问题 单项选择题

在匹配器(Matcher)类中,用于寻找下一个模式匹配串的方法是

A.static boolean matches()

B.boolean marcher.find()

C.int matcher.start()

D.int matcher.end()

答案

参考答案:B

解析: 本题考查考生对Java中的匹配器(Marcher)类的理解。Marcher类用于将一个输入字符串input和模式串pattern相比较。boolean mateher,find()方法用于寻找下一个模式匹配牢:int marcher.start()方法用于返回匹配串的一个起始索引整数值;int matcher.end()方法用于返回匹配串的一个终止索引整数值。而用于输入字符串与模式串比较的方法是static boolean matches(),选项B正确。

单项选择题

The great advance (91) rocket theory 40 years ago showed that liquid-fuel rockets were far (92) in every respect to the skyrocket with its weak solid fuel, the only kind of rocket then known. (93) , during the last decade, large solid-fuel rockets with (94) fuels about as powerful as liquid fuels have (95) their appearance, and it is a favorite layperson’s question to (96) which one is "better". The question is meaningless. (97) might as well ask whether a gasoline or a diesel engine is "better". It all (98) on the purpose. A liquid-fuel rocket is complicated, (99) has the advantage that it can be controlled beautifully. The burning of the rocket engine can be stopped completely; it can be reignited when (100) . (101) , the thrust can be made to vary by adjusting the speed of the fuel pumps. A solid-fuel rocket, on the other hand, is rather (102) in construction, (103) hard to build when a really (104) size is desired. But once you have a solid-fuel rocket, it is ready for action (105) very short notice. A liquid-fuel rocket has to be fueled first and cannot be (106) readiness for very long after it has been fueled. (107) , once a solid-fuel rocket has been ignited, it will keep burning. It cannot be stopped and reignited (108) desired (it could conceivably be stopped and reignited after a pre-calculated time of burning has elapsed, and its thrust cannot be varied. Because a solid-fuel rocket can be kept ready for a long time, most military missiles (109) solid fuels, but human-piloted spaceflight needs the fine adjustments that can (110) be provided by liquid fuels.

A.stayed

B.controlled

C.detained

D.held

单项选择题