Multiple Choice
What will be displayed after the following statements are executed?
int hours = 30;
Double pay, payRate = 10.00;
Pay = hours <= 40 ? hours*payRate : hours*payRate*2.0;
System.out.println(pay) ;
A) 300.0
B) 600.0
C) 400.0
D) The code contains an error and will not compile.
Correct Answer:

Verified
Correct Answer:
Verified
Q10: What will be the value of discountRate
Q13: When testing for character values, the switch
Q32: Which of the following expressions will generate
Q33: In a switch statement, if two different
Q40: Java requires that the boolean expression being
Q41: What will be displayed after the following
Q42: In an if-else statement, if the boolean
Q44: Which of the following expressions determines whether
Q48: If the expression on the left side
Q56: All it takes for an AND expression