New Year Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free Oracle 1z0-808 Practice Exam with Questions & Answers | Set: 2

Questions 11

Given:

1z0-808 Question 11

What is the result?

Options:
A.

C B A

B.

C

C.

A B C

D.

Compilation fails at line n1 and line n2

Oracle 1z0-808 Premium Access
Questions 12

Which two code fragments cause a compilation error? (Choose two.)

Options:
A.

float flt = 100.00F;

B.

float flt = (float) 1_11.00;

C.

Float flt = 100.00;

D.

double y1 = 203.22;float flt = y1;

E.

int y2 = 100;float flt = (float) y2 ;

Questions 13

Which one of the following code examples uses valid Java syntax?

1z0-808 Question 13

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 14

Given these two classes:

1z0-808 Question 14

Any amount of electricity used by a customer (represented by an instance of the Customer class) must contribute to the customer's bill (represented by the member variable bill) through the useElectricity method.

An instance of the Customer class should never be able to tamper with or decrease the value of the member variable bill.

How should you write methods in the ElectricAccount class at line n1 so that the member variable bill is always equal to the value of the member variable kwh multiplied by the member variable rate?

1z0-808 Question 14

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 15

Given the code fragment:

1z0-808 Question 15

What is the result?

Options:
A.

true true

B.

true false

C.

false false

D.

false true

Questions 16

Given the code fragment:

1z0-808 Question 16

Test.java:

1z0-808 Question 16

Which is the result?

1z0-808 Question 16

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Questions 17

Given:

1z0-808 Question 17

What is the result?

1z0-808 Question 17

Options:
A.

Option A

B.

Option B

C.

Option C

D.

Option D

Questions 18

Given:

1z0-808 Question 18

Given the code fragment:

1z0-808 Question 18

Which two sets of actions, independently, enable the code fragment to print Fit?

Options:
A.

At line n1 insert: import clothing.Shirt;At line n2 insert: String color = Shirt.getColor();

B.

At line n1 insert: import clothing;At line n2 insert: String color = Shirt.getColor();

C.

At line n1 insert: import static clothing.Shirt.getColor;At line n2 insert: String color = getColor();

D.

At line n1 no changes required.At line n2 insert: String color = Shirt.getColor();

E.

At line n1 insert: import Shirt;At line n2 insert: String color = Shirt.getColor();

Questions 19

Given the code fragment:

1z0-808 Question 19

Which modification enables the code fragment to print TrueDone?

Options:
A.

Replace line 5 With String opt = "true";Replace line 7 with case "true":

B.

Replace line 5 with boolean opt = l;Replace line 7 with case 1:

C.

At line 9, remove the break statement.

D.

Remove the default section.

Questions 20

Given:

1z0-808 Question 20

What is the result?

Options:
A.

Welcome Visit Count:0Welcome Visit Count: 1

B.

Compilation fails at line n2.

C.

Compilation fails at line n1.

D.

Welcome Visit Count:0Welcome Visit Count: 0

Exam Code: 1z0-808
Certification Provider: Oracle
Exam Name: Java SE 8 Programmer I
Last Update: Mar 28, 2025
Questions: 224