The value of the controlling expression in a switch may be of type(s)

a. int
b. int and char
c. int and double
d. char and double


b. int and char

Computer Science & Information Technology

You might also like to view...

Which of the following statements is true?

``` public class TestA { public static void main(String[] args) { int x = 2; int y = 20 int counter = 0; for (int j = y % x; j < 100; j += (y / x)) { counter++; } } } public class TestB { public static void main(String[] args) { int counter = 0; for (int j = 10; j > 0; --j) { ++counter; } } } ``` a. The value of counter will be different at the end of each for loop for each class. b. The value of j will be the same for each loop for all iterations c. Both (a) and (b) are true. d. Neither (a) nor (b) is true.

Computer Science & Information Technology

Write a short code fragment that uses a while loop to verify that the user enters a positive integer as input. You may assume that a Scanner object named input has already been created.

What will be an ideal response?

Computer Science & Information Technology

When you set a reminder, Outlook automatically sets the time for the reminder to ____.

A. 7:00 AM B. 8:00 AM C. 8:30 AM D. 9:00 AM

Computer Science & Information Technology

Tabs can be set ONLY from the horizontal ruler

Indicate whether the statement is true or false

Computer Science & Information Technology