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: 5 / 7
Total 224 questions

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

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 ;

Given the code fragment:

What is the result?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given the code fragment:

Which modification enables the code fragment to print TrueDone?

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.

Given the code fragment:

Which code fragment prints red: blue: small: medium?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

You are developing a banking module. You have developed a class named ccMask that has a maskcc method.

Given the code fragment:

You must ensure that the maskcc method returns a string that hides all digits of the credit card number except the four last digits (and the hyphens that separate each group of four digits).

Which two code fragments should you use at line n1, independently, to achieve this requirement? (Choose two.)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given the code fragment:

What is the result?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given the code fragment:

What is the result?

A.

Compilation fails.

B.

The program compiles, but it prints nothing.

C.

HiHowAreYou removed

D.

An UnsupportedOperationException is thrown at runtime.

Which two class definitions fail to compile? (Choose two.)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Given the code fragment:

What is the result?

A.

[JavaForum, ExpertForum]

B.

[JavaGroup, ExpertGroup]

C.

[JavaForumGroup, ExpertForumGroup]

D.

[JavaGroup, TechGroup ExpertGroup]

Given:

What is the result?

A.

double sum is 30.0 float sum is 30.0

B.

float sum is 30.0 double sum is 30.0

C.

Integer sum is 30 double sum is 30.0

D.

Integer sum is 30 float sum is 30.0