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

Oracle 1z0-819 - Java SE 11 Developer

Page: 3 / 9
Total 296 questions

Given:

A.

Abcd

B.

Abdf

C.

The compilation fails.

D.

Abd

E.

adf

Your organization provides a cloud server to your customer to run their Java code. You are reviewing the changes for the next release and you see this change in one of the config files:

Which is correct?

A.

You accept the change because -noverify is necessary for your code to run with the latest version of Java.

B.

You reject the change because -Xms8g -Xmx8g uses too much system memory.

C.

You accept the change because -noverify is a standard option that has been supported since Java 1.0.

D.

You reject the change because -noverify is a critical security risk.

A company has an existing sales application using a Java 8 jar file containing packages:

com.company.customer;

com.company.customer.orders;

com.company.customer.info;

com.company.sales;

com.company.sales.leads;

com.company.sales.closed;

com.company.orders;

com.company.orders.pending;

com.company.orders.shipped.

To modularize this jar file into three modules, customer, sales, and orders, which module-info.java would be correct?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given the code fragment:

Which two code snippets inserted independently inside println method print Mondial:domainmodel? (Choose two.)

A.

Main.prefix + Main.name

B.

prefix + getName

C.

Main.prefix + Main.getName()

D.

new Main().prefix + new Main().name

E.

prefix + name

F.

prefix + Main.name

Given:

What is the type of the local variable x?

A.

Character

B.

char

C.

String[ ]

D.

String

Given:

Which option should you choose to enable the code to print Something happened?

A.

Add extends GeneralException on line 1.

Add extends Exception on line 2.

B.

Add extends SpecificException on line 1.

Add extends GeneralException on line 2.

C.

Add extends Exception on line 1.

Add extends Exception on line 2.

D.

Add extends Exception on line 1.

Add extends GeneralException on line 2.

Assuming the Widget class has a getPrice method, this code does not compile:

Which two statements, independently, would allow this code to compile? (Choose two.)

A.

Replace line 5 with widgetStream.filter(a −> ((Widget)a).getPrice() > 20.00).

B.

Replace line 1 with List widgetStream = widgets.stream();.

C.

Replace line 5 with widgetStream.filter((Widget a) −> a.getPrice() > 20.00).

D.

Replace line 4 with Stream widgetStream = widgets.stream();.

Given:

What is the output?

A.

I am an object array

B.

The compilation fails due to an error in line 1.

C.

I am an array

D.

I am an object

var numbers = List.of(0,1,2,3,4,5,6,7,8,9);

You want to calculate the average of numbers. Which two codes will accomplish this? (Choose two.)

A.

double avg = numbers.stream().parallel().averagingDouble(a −> a);

B.

double avg = numbers.parallelStream().mapToInt (m −> m).average().getAsDouble ();

C.

double avg = numbers.stream().mapToInt (i −> i).average().parallel();

D.

double avg = numbers.stream().average().getAsDouble();

E.

double avg = numbers.stream().collect(Collectors.averagingDouble(n −> n));

Which line of code results in a compilation error?

A.

line n1

B.

line n3

C.

line n2

D.

line n4