For the two code segments below:
Segment A
int q = 5;
switch(q)
{
case 1:
System.out.println(1);
case 2:
System.out.println(2);
case 3:
System.out.println(3);
case 4:
System.out.println(4);
case 5:
System.out.println(5);
default:
System.out.println("default");
}
Segment B
q = 4;
switch(q)
{
case 1:
System.out.println(1);
case 2:
System.out.println(2);
case 3:
System.out.println(3);
case 4:
System.out.println(4);
case 5:
System.out.println(5);
default:
System.out.println("default");
}
Which of the following statements is true?
a. The output for Segment A is:
default
b. The output for Segment B is:
4
c. The output for Segment B is:
45default
d. The output for Segment A is:
5
default
d. The output for Segment A is:
5
default
You might also like to view...
You can use the ____ panel to transfer files to a remote site.
A. CSS B. Application C. Files D. Remote
When manually typing criteria such as a date in a function, you must enclose the criteria with ________
A) quotation marks (") B) asterisks (*) C) number signs (#) D) ampersands (@)
A GameObject in Unity does not have to have a Transform Component attached to it
Indicate whether the statement is true or false
In the formula =IF(A1=B1, C1, C2), the result will be C2 if ____.
A. A is equal to B B. A does not equal B C. A1+B1 is equal to C1 D. A1>B1 is equal to C2