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

Oracle 1z0-819 - Java SE 11 Developer

Page: 8 / 9
Total 296 questions

Given:

What is the result?

A.

Green

B.

Mr, Blue

C.

Mr, Green

D.

An exception is thrown at runtime

Given:

Which is true?

A.

The compilation fails due to an error in line 6.

B.

The compilation succeeds.

C.

The compilation fails due to an error in line 4.

D.

The compilation fails due to an error in line 10.

E.

The compilation fails due to an error in line 7.

F.

The compilation fails due to an error in line 9.

G.

The compilation fails due to an error in line 2.

Given:

You want the code to produce this output:

John

Joe

Jane

Which code fragment should be inserted on line 1 and line 2 to produce the output?

A.

Insert Comparator on line 1.

Insert

public int compare(Person p1, Person p2) {

return p1.name.compare(p2.name);

}

on line 2.

B.

Insert Comparator on line 1.

Insert

public int compareTo(Person person) {

return person.name.compareTo(this.name);

}

on line 2.

C.

Insert Comparable on line 1.

Insert

public int compare(Person p1, Person p2) {

return p1.name.compare(p2.name);

}

on line 2.

D.

Insert Comparator on line 1.

Insert

public int compare(Person person) {

return person.name.compare(this.name);

}

on line 2.

Given:

When is the readObject method called?

A.

before this object is deserialized

B.

after this object is deserialized

C.

before this object Is serialized

D.

The method is never called.

E.

after this object is serialized

Given:

What is the result?

A.

At once 0

B.

An indexOutofBoundsException is thrown at runtime.

C.

Hat at store 4

D.

At once 1

E.

Hat at store 1

Given the code fragment:

What is the result?

A.

A java.lang, UnsupportedOperationException is thrown.

B.

True

C.

False

D.

A java.lang.NullPointerException is thrown.

Given:

Which is true?

A.

The code compiles but does not print any result.

B.

The code prints 25.

C.

The code does not compile.

D.

The code throws an exception at runtime.

Given the code fragment:

What is the result?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Analyze the code:

Which two options can you insert inside println method to produce Global:namescope? (Choose two.)

A.

Test.prefix+Test.name

B.

new Test().prefix+new Test().name

C.

Test.prefix+Test.getName()

D.

Test.getName+prefix

E.

prefix+Test.name

F.

prefix+name

Given:

What is the result?

A.

watermelonorangelemongrapeapricotapple

B.

nothing

C.

appleapricotgrapelemonorangewatermelon

D.

appleorangegrapelemonapricotwatermelon