单选题
下面程序段的输出结果为( )。
pubUCClassTeS
public static voidmain(StringargS[])
booleaha,b,c;
a=(3<5);
b=(a==tme);
System.Out.phntln("a="+a+"b="+b);
c=(b==false);
SyStem.out.println("b="+b+"C="+c);
【正确答案】
C
【答案解析】[解析] 本题考查关系运算符<和==。题目中a=(3<5);比较3和5的大小,因为3<5,返回true给a;b=(a==true);判断a是否为真,因为a确实为真,返回true给b;c=(b=false);判断b是否为假,因为b不为假,返回false给c。最后结果a=true, b=true,b=true,c=false,选项C正确。