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

Oracle 1z0-819 - Java SE 11 Developer

Page: 1 / 9
Total 296 questions

What is the result?

A.

357

B.

35

C.

235

D.

2357

E.

An ArrayIndexOutOfBoundsException is thrown at runtime.

Given:

Which action must you perform to print Verified?

A.

Make the verify method public and invoke it from the main method.

B.

Invoke the verify method from the place method.

C.

Change the declaration of the order variable to orderService order = New order(); and

Invoke the verify method from the main method.

D.

Invoke the verify method from the main method.

Given the code fragment:

You want to validate a path name before the read file. Before validation, all path names should be canonicalized.

Which code inserted on line nl will accomplish this?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given the content from the course.txt file:

Which code fragment at line 1 prints the lines that contain Java from the course.txt file?

A)

B)

C)

D)

E)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Given:

What is the result?

A.

2134

B.

234

C.

2341

D.

214

Given:

You want to calculate the average of the Player’s score.

Which statement inserted on line 1 will accomplish this?

A.

players.stream().average().orElse(0.0);

B.

players.stream().mapToInt(a -> a.score).average().orElse(0.0);

C.

players.stream().mapToDouble(a -> a.score).average();

D.

players.stream().map(a -> a.score).average();

Which is the correct order of possible statements in the structure of a Java class file?

A.

class, package, import

B.

package, import, class

C.

import, package, class

D.

package, class, import

E.

import, class, package

Given:

Which expression when added at line 1 will produce the output of 1.17?

A.

float z = (float)(Math.round((float)x/y*100)/100);

B.

float z = Math.round((int)(x/y),2);

C.

float z = Math.round((float)x/y,2);

D.

float z = Math.round((float)x/y*100)/(float)100;

Given:

What is the result?

A.

Orange Juice

B.

The compilation fails.

C.

Orange Juice Apple Pie Lemmon Ice Raspberry Tart

D.

The program prints nothing.

Given:

Which annotation should be used to remove warnings from compilation?

A.

@SuppressWarnings on the main and print methods

B.

@SuppressWarnings(“unchecked”) on main and @SafeVarargs on the print method

C.

@SuppressWarnings(“rawtypes”) on main and @SafeVarargs on the print method

D.

@SuppressWarnings(“all”) on the main and print methods