问题
单项选择题
StringBuffer类字符串对象的长度是
A.固定
B.必须小于16字符
C.可变
D.必须大于16字符
答案
参考答案:C
解析: StringBuffer类提供长度可变字符串对象的表示。凡生成StringBuffer一个对象后,还可用setLength()方法或ensureCapacity()方法来设定缓存大小,并保证其数组元素的初始值都为0。
StringBuffer类字符串对象的长度是
A.固定
B.必须小于16字符
C.可变
D.必须大于16字符
参考答案:C
解析: StringBuffer类提供长度可变字符串对象的表示。凡生成StringBuffer一个对象后,还可用setLength()方法或ensureCapacity()方法来设定缓存大小,并保证其数组元素的初始值都为0。
完形填空 | ||||
Early one morning, an old woman was carrying a big basket of cabbages on her hand to the market. She hoped to 1 them to the people from the town. The mountain road was narrow(窄的) and the old woman was walking 2 , because she did not want to have 3 and lose her cabbages. Suddenly she 4 a loud noise, and a bicycle came round the comer. It passed her and went very fast 5 the hill. The old woman had to jump to one side of the 6 so quickly that the basket of cabbages nearly fell into the valley( 山谷). She looked up and saw that a young boy was on the bicycle. He was 7 on without even looking round to see 8 the old woman was all right. The old woman began to shout, "Come back, young man! You dropped something!" When he heard this, the boy stopped the bicycle so suddenly that he 9 fell off his bicycle.Then he turned and began to 10 the bicycle back up to the hill. "What is it!" he asked. "What did I drop?" " Young boy, " the old woman answered, "you dropped your manners(礼貌) . " | ||||
|