Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Oracle 1z0-808 - Java SE 8 Programmer I

Page: 6 / 7
Total 224 questions

Which statement is true about the switch statement?

A.

It must contain the default section.

B.

The break statement, at the end of each case block, is mandatory.

C.

Its case label literals can be changed at runtime.

D.

Its expression must evaluate to a single value.

Given the code fragment:

What is the result?

A.

A B C

B.

A B C D E

C.

A B D E

D.

Compilation fails.

Given:

What is the result?

A.

3 4 5 6

B.

3 4 3 6

C.

5 4 5 6

D.

3 6 4 6

Given:

What is the result?

A.

3 4 5 6

B.

3 4 3 6

C.

5 4 5 6

D.

3 6 5 6

Given:

And given the code fragment:

What is the result?

A.

C2C2

B.

C1C2

C.

C1C1

D.

Compilation fails

Given:

What is the result?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given this code for a Planet object:

What is the output?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Given the following main method:

What is the result?

A.

5 4 3 2 1 0

B.

5 4 3 2 1

C.

4 2 1

D.

5

E.

Nothing is printed

Given the code fragment:

And given the requirements:

If the value of the qty variable is greater than or equal to 90, discount = 0.5

If the value of the qty variable is between 80 and 90, discount = 0.2

Which two code fragments can be independently placed at line n1 to meet the requirements? (Choose two.)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Given the code fragment:

Which two code fragments inserted at line 10 print ****?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E