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

Given:

What is the result?

A.

Area is 6.0

B.

Area is 3.0

C.

Compilation fails at line n1

D.

Compilation fails at line n2.

Given the code fragment:

What is the result?

A.

3142

B.

2413

C.

1324

D.

4231

Given the code fragment:

You want the code to print:

Sold: 5 items. Stock in Hand: 5 Purchased: 5 items. Stock in Hand: 10?

Which action enables the code to print this?

A.

Declare the stock variable and the purchase(), sell(), and printStock() methods static.

B.

Declare the stock variable and the printStock() method static.

C.

Declare the stock and qty variables and the printStock() method static.

D.

Declare the stock variable static.

Given the code fragment:

What is the result?

A.

1324

B.

2313

C.

3142

D.

4231

Given:

And given the commands:

What is the result?

A.

Java SE

B.

Java EE

C.

Compilation fails at line n1.

D.

A NullPointerException is thrown at runtime.

Given the content of three files:

Which statement is true?

A.

Only the A.Java file compiles successfully.

B.

Only the B.java file compiles successfully.

C.

Only the C.java file compiles successfully.

D.

The A.Java and B.java files compile successfully.

E.

The B.java and C.java files compile successfully.

F.

The A.Java and C.java files compile successfully.

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 the code fragment:

What is the result?

A.

11

B.

10

C.

12

D.

A compile time error occurs.

Given the code fragment:

Test.java:

Which is the result?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Examine the content of App.java:

Which is true?

A.

The App.class file is stored within the p1 folder. The Test.class file is stored within the p2 sub-folder of p1.

B.

The App class is accessible within the Test class without an import statement.

C.

import p1.App; is used to access the App class within the Test class.

D.

It is optional to have the package statement as the first line of class definitions.