Solved

What Will Be Displayed After the Following Statements Are Executed

Question 22

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions