What would be the value of discountRate after the following statements are executed?
Double discountRate;
Char custType = 'B';
Switch (custType)
{
Case 'A':
DiscountRate = 0.08;
Break;
Case 'B':
DiscountRate = 0.06;
Case 'C':
DiscountRate = 0.04;
Default:
DiscountRate = 0.0;
}
A) 0.08
B) 0.06
C) 0.04
D) 0.0
Correct Answer:
Verified
Q14: A local variable's scope always ends at
Q15: The if-else statement will execute one group
Q20: Unicode is an international encoding system that
Q22: The _ statement is used to create
Q23: A _ is a boolean variable that
Q25: Which of the following expressions determines whether
Q33: Java requires that the boolean expression being
Q34: When two strings are compared using the
Q35: When a character is stored in memory,
Q60: An important style rule you should adopt
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents