问题 单项选择题

下面程序段: boolean a=false; boolean b=true; boolean c=(a||b)&&(b); boolean result=(a|b)&(b); 执行完后,正确的结果是

A.c=false;result=false

B.c=true,result=true

C.c=true;result=false

D.c=false;result=true

答案

参考答案:B

解析: 本题考查Java中的运算符。考试重点内容,历次考试都有题目涉及。首先要清楚,“&&”是逻辑与运算符;“&”是按位与运算符;“||”是逻辑或运算符;“|”是按位或运算符。“a||b”的结果为true,所以“true&&true”结果为true。而“a|b”的结果也为true,故result=(a|b)&(b)语句的结果也为true,选项B正确。

单项选择题

In meditation (冥想), people sit quietly and focus their attention on their breath. As they breathe in and out, they attend to their feelings. As thoughts go through their minds, they let them go. Breathe. Let go. Breathe. Let go.
According to a recent study at the Insight Meditation Society in Barre, Massachusetts, three months of training in this kind of meditation causes a marked change in how the brain allocates (分配) attention. It appears that the ability to let go thoughts that come into mind frees the brain to attend to more rapidly changing things and events in the outside world. Expert mediators are better than other people at catching such fast-changing stimuli(刺激), like facial-expressions.
The study provides evidence for changes in the workings of the brain with mental training. People can learn and improve abilities of all sorts with practice, everything from driving to playing the piano. The study has shown that meditation is good for the brain. It appears to reduce pressure and promote a sense of well-being.
In an experiment, 17 volunteers with no meditation experience in the experimental group spent three months meditating 10 to 12 hours a day. A control group also with no meditation experience meditated for 20 minutes a day over the same period. Both groups were then given the tests with two numbers in a group of letters. As both groups looked for the numbers, their brain activity was recorded.
Everyone could catch the first number. But the brain recordings showed that the less experienced mediators tended to grasp the first number and hang onto it, so they missed the second number. Those with more experience gave less attention to the first number, as if letting it go, which led to an increased ability to grasp the second number. This shows that attention can change with practice.
Just ask Daniel Levision, who meditated for three months as part of the study. "I am a much better listener," he said, "I do not get lost in my own personal reaction to what people are saying. \

The study proves that ______.

A.meditation improves one’s health

B.brain activity can be recorded

C.human attention can be trained

D.mediators have a good sense of hearing

多项选择题