Summer Special 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: bestdeal

Free Oracle 1z0-819 Practice Exam with Questions & Answers | Set: 4

Questions 31

Given:

1z0-819 Question 31

Which statement is true?

Options:
A.

Class Tester does not need to import java.time.LocalDate because it is already visible to members of the package test.

B.

All classes from the package java.time. are loaded for the class Diary.

C.

Only LocalDate class from java.time package is loaded.

D.

Tester must import java.time.LocalDate in order to compile.

Oracle 1z0-819 Premium Access
Questions 32

Given:

1z0-819 Question 32

What is the result?

Options:
A.

nothing

B.

It fails to compile.

C.

0

D.

A java.lang.IllegalArgumentException is thrown.

E.

10

Questions 33

Given:

1z0-819 Question 33

You want to implement the java.io.Serializable interface to the MyPersistenceData class.

Which method should be overridden?

Options:
A.

the readExternal method

B.

nothing

C.

the readExternal and writeExternal method

D.

the writeExternal method

Questions 34

Given the code fragment:

1z0-819 Question 34

Which can replace line 2?

Options:
A.

UnaryOperator u = (int i) -> i * 2;

B.

UnaryOperator u = (var i) -> (i * 2);

C.

UnaryOperator u = var i -> { return i * 2; };

D.

UnaryOperator u = i -> { return i * 2);

Questions 35

Given the Customer table structure:

• ID Number Primary Key

• NAME Text Nullable

Given code fragment:

1z0-819 Question 35

Which statement inserted on line 14 sets NAME column to a NULL value?

Options:
A.

Stmt.setNull(2, java,sql. Types, VARCHAR);

B.

Stmt.setNull(2 string, class);

C.

Stmt.setNull(2, null);

D.

Stmt.setNull(2, java.lang, string);

Questions 36

Given:

1z0-819 Question 36

What is the output?

Options:
A.

Short value 25

B.

The compilation fails due to an error in line 1.

C.

Byte value 25

D.

Object value 25

Questions 37

Given:

1z0-819 Question 37

Which is true?

Options:
A.

System.out is the standard output stream. The stream is open only when System.out is called.

B.

System.in cannot reassign the other stream.

C.

System.out is an instance of java.io.OutputStream by default.

D.

System.in is the standard input stream. The stream is already open.

Questions 38

Given the code fragment:

1z0-819 Question 38

What is the result?

Options:
A.

1

B.

The compilation fails at line

C.

10

D.

The compilation fails at line 16.

E.

The compilation fails at line 13.

Questions 39

Which two statements are correct about modules in Java? (Choose two.)

Options:
A.

java.base exports all of the Java platforms core packages.

B.

module-info.java can be placed in any folder inside module-path.

C.

A module must be declared in module-info.java file.

D.

module-info.java cannot be empty.

E.

By default, modules can access each other as long as they run in the same folder.

Questions 40

Given:

1z0-819 Question 40

and

1z0-819 Question 40

Which two method definitions at line n1 in the Bar class compile? (Choose two.)

Options:
A.

public List foo(Set m) {...}

B.

public List foo(Set m) {...}

C.

public List foo(TreeSet m) {...}

D.

public List foo(Set m) {...}

E.

public ArrayList foo(Set m) {...}

F.

public ArrayList foo(Set m) {...}

Exam Code: 1z0-819
Certification Provider: Oracle
Exam Name: Java SE 11 Developer
Last Update: Jul 16, 2025
Questions: 296