Which of the following statements about the switch statement is true?
A. Multiple case labels can be associated with one series of actions.
B. The case label values can be characters, integrals, or reals.
C. If no default label is provided, the results are unpredictable.
D. The switch expression must be a unary expression.
E. The switch statement is terminated by a semicolon.
Answer: A
You might also like to view...
Which of the following is NOT identified in the textbook as a stage in the writing process?
A) Revising B) Planning C) Writing D) Collaborating
Your math class is studying probability by flipping a coin and seeing how many times in a row you can call the flip correctly. Your instructor breaks the class of 32 students into teams of two persons each. One member of each team flips a coin while the other calls heads or tails. If a flip is called correctly, the caller wins; otherwise the flipper wins. You can form new teams whenever you like,
and each person keeps track of his or her individual wins. Your instructor offers a wager. Any student who can win five flips in a row will receive an A on the next quiz. But if they fail even once, they receive an F. There are no takers. So another wager is offered. An A will go to the student who can devise a method that guarantees someone in the class will win five flips in a row.
A PowerPoint presentation can be saved as a Web page and posted to the World Wide Web
Indicate whether the statement is true or false
The "less than or equal to" comparison operator in Java is __________.
a. < b. <= c. =< d. << e. !=