Question: Question 1 Identify the data type(s) that can be used in a Java switch expression. Select ALL that apply. Question options: int String short double

Question 1 Identify the data type(s) that can be used in a Java switch expression. Select ALL that apply.

Question options:

int

String

short

double

long

char

Question 3 This tests if two different objects contain the same string.

Question options:

the == operator

the stringCompare method

the equals method

the = operator

Question 5 Identify the expression(s) that return true if an int named num is between 100 and 200, inclusive. Select ALL that apply.

Question options:

num > 99 && num <= 201

num >= 100 and num <= 200

num >= 100 && num <= 200

num > 100 && num < 200

num >= 100 || num <= 200

Question 6

int n1 = 12; int n2 = 5;

Identify the statement(s) that are true. Select ALL that apply.

Question options:

n1 > 10 ^ n2 > 10

n1 > 10 ^ n2 < 10

n2 > 10 ^ n1 > 10

n1 < 10 ^ n2 > 10

Question 7

int var1 = 5, var2 = 6; if ((var2 = 1) == var1) System.out.print(var2); else System.out.print(++var2);

What is printed by the code above?

Question options:

1

2

3

4

Nothing, Code does not compile.

Question 11

Which of these operators might not have to evaluate the right hand operand in order to be true?

Question options:

^

&&

||

!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!