问题 单项选择题

阅读下面程序
publicclass Operators AndExpressions
voidequalsMethodl()
Strings1=newString("howareyou");
Strings2=newString("howareyou");
System.out.println(s1==s2);

publicstaticvoidmain(Stringargs[])
OperatorsAndExpressionsOperAndExp=newOperatorsAndExpressions
();
//用于复合类型数据的“==”运算符
OperAndExp.equalsMethodl();


程序运行结果是( )。

A.==

B.true

C.false

D.equal

答案

参考答案:C

解析: 本题考查的足Java语言中运算符的特殊用法。相等比较运算符“==”,不仅可用于基本类型的数据之间的比较,还可以用于复合数据类型之间的比较。但是,对于复合类型数据的“==”运算,其比较的目标是两个操作数是否是同一个对象。如果需要比较两个对象的值是否相同,则可以调用equals()方法。题目中函数equalsMethodl()的代码非常简单,首先生成两个字符串对象s1和s2,然后输出表达式“s1==s2”的结果。根据上面介绍的相等比较运算符的用法,字符串对象s1和s2是复合数据类型,因此表达式“s1==s2”比较的是s1和s2是否同一个对象。显然,s1和s2虽然具有相同的值,即“howareyou”,但它们是两个不同的对象。因此,本题的正确答案足C,

选择题
单项选择题

In War Made Easy Norman Solomon demolishes the myth of all independent American press zealously guarding sacred values of free expression. Although strictly focusing on the shameless history of media cheerleading for the principal post World War’ Ⅱ American wars, invasions, and interventions, he calls into question the entire concept of the press as some kind of institutional counterforce to government and corporate power.

Many of the examples compiled in this impeccably documented historical review will be familiar to readers who follow the news on the Internet. But such examples achieve flesh impact because of the way Solomon has organized and analyzed them. Each chapter is devoted to a single warhawk argument ( " America Is a Fair and Noble Superpower, " " Opposing the War Means Siding with the Enemy, " "Our Soldiers Are Heroes, Theirs Are Inhuman " ), illustrated with historical examples from conflicts in the Dominican Republic, E1 Salvador, Vietnam, Grenada, Panama, Kosovo, both Iraq wars, and others in which the media were almost universally enthusiastic accomplices.

The book should really be subtitled " War reporting doesn’t just suck, it kills. " It makes you feel like demanding a special war crimes tribunal for corporate media executives and owners who joined the roll-up to " shock and awe " as non-uniformed psywar ops. To be sure, this would raise the issue of whether or not following orders might suffice for the defense of obedient slaves such as Mary McGrory and Richard Cohen, who performed above and beyond the call of duty. " He persuaded me, " McGrory gushed the morning after Colin Powell addressed a plenary session of the United Nations on February 5,2003, declaring that Iraq had weapons of mass destruction. " The cumulative effect was stunning." In the same Washington Post edition, Cohen wrote.

The evidence he presented to the United Nations—some of it circumstantial, some of it absolutely bone-chilling in its detail—had to prove to anyone that Iraq not only hasn’t accounted for its weapons of mass destruction but without a doubt still retains them. Only a fool could conclude otherwise.

Solomon demonstrates how this kind of peppy prewar warm-up degenerates into drooling and heavy breathing once the killing begins. As if observing a heavy metal computer game, the pornographers of death concentrate on the exquisite craftsmanship and visual design of the murder machines, and the magnificence of the fiery explosions they produce.

In the second to last paragraph, " could conclude otherwise " probably means that()

A. the evidence given was true

B. Iraq had no weapons of mass destruction

C. Cohen gave horrifying description of Iraq

D. Colin Powell’s address was out of question