Which of the following values for q will result in kiwi being included in the output?

```
switch(q) {
case 1:
System.out.println("apple");
break;
case 2:
System.out.println("orange");
break;
case 3:
System.out.println("banana");
break;
case 4:
System.out.println("pear");
case 5:
System.out.println("grapes");
default:
System.out.println("kiwi");
}
```

a. 2.
b. Any integer less than 1 and greater than or equal to 4.
c. 1.
d. 3.


b. Any integer less than 1 and greater than or equal to 4.

Computer Science & Information Technology

You might also like to view...

In Excel, you can move from one worksheet to another by clicking the data bar

Indicate whether the statement is true or false

Computer Science & Information Technology

The ________ function converts text to title case

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

The switch statement repeats a statement or series of statements as long as a given conditional expression evaluates to true.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What is the primary hash algorithm used by the NIST project created to collect all known hash values for commercial software and OS files?

a. MD5 b. SHA-1 c. CRC-32 d. RC4

Computer Science & Information Technology