题目内容

WhichoftheBooleanexpressionsbelowhasincorrectsyntax?

A. (x>0)||(x<0)
B. (x!=0)||(x=0)
C. !(x>0)&&(x>0)
D. (true)&&(3>4)

查看答案
更多问题

Assumex=4andy=5,whichofthefollowingistrue?

A. !(x==4)^y!=5
B. x!=4^y==5
C. x!=5^y!=4
D. x==5^y==4

Supposex=10andy=10.Whatisxafterevaluatingtheexpression(y>=10)||(x++>10).

A. 11
B. 9
C. 10

Supposex=0andy=0whatisxafterevaluatingtheexpression(y>0)&&(1>x++).

A. 0
B. 1
C. -1

Analyzethefollowingcode:if (x < 100) && (x > 10)System.out.println("x is between 10 and 100");

A. Thestatementcompilesfine,buthasaruntimeerror.
B. Thestatementhascompileerrorsbecause(x<100)&(x>10)mustbeenclosedinsideparenthesesandtheprintln(…)statementmustbeputinsideablock.
C. Thestatementhascompileerrorsbecause(x<100)&(x>10)mustbeenclosedinsideparentheses.
D. Thestatementcompilesfine.

答案查题题库