Analyze the following code:
if (x < 100) && (x > 10)
System.out.println("x is between 10 and 100");
a.The statement has compile errors because (x<100) & (x > 10) must be enclosed inside parentheses.
b.The statement has compile errors because (x<100) & (x > 10) must be enclosed inside parentheses and the println(…) statement must be put inside a block.
c.The statement compiles fine.
d.The statement compiles fine, but has a runtime error.
a.The statement has compile errors because (x<100) & (x > 10) must be enclosed inside parentheses.
The condition for an if statement must be enclosed in the parentheses.
Computer Science & Information Technology