Labour Day Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

Oracle 1z0-829 Java SE 17 Developer Exam Practice Test

Page: 1 / 5
Total 50 questions

Java SE 17 Developer Questions and Answers

Question 1

Given:

Question # 1

What is the result?

Options:

A.

Mb

MC

B.

Mb

C.

Mb

D.

MA

E.

mA

Question 2

Given:

Question # 2

and the code fragment:

Question # 2

Options:

A.

300.00

CellPhone,ToyCar,Motor,Fan

B.

100.00

CellPhone,ToyCar,Motor,Fan

C.

100.00 CellPhone,ToyCar

D.

300.00

CellPhone.ToyCar

Question 3

Given the code fragment:

Question # 3

What is the result?

Options:

A.

Cat

Dog

B.

A NullPointerException is thrown

Cat

Cat

C.

Dog

Dog

D.

Cat

null

Question 4

Given the code fragments:

Question # 4

Which action prints Wagon : 200?

Options:

A.

At line n1, implement the java.io, Serializable interface.

B.

At line n3, replace readObject (0 with readLine().

C.

At Line n3, replace Car with LuxurayCar.

D.

At Line n1, implement the java.io.AutoCloseable interface

E.

At line n2, in the main method signature, add throws IOException, ClassCastException.

F.

At line n2, in the main method signature, add throws IoException, ClassNotFoundException.

Question 5

Given the code fragment:

Question # 5

Which code line n1, obtains the java.io.Console object?

A)

Question # 5

B)

Question # 5

C)

Question # 5

D)

Question # 5

E)

Question # 5

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Question 6

Given:

Question # 6

Which action enables the code to compile?

Options:

A.

Replace 15 with item.display (''Flower'');

B.

Replace 2 with static string name;

C.

Replace 7 with public void display (string design) {

D.

Replace 3 with private static void display () {

Question 7

Which statement is true?

Options:

A.

The tryLock () method returns a boolean indicator immediately regardless if it has or has not managed to acquire the lock.

B.

The tryLock () method returns a boolean indicator immediately if it has managed to acquire the lock, otherwise it waits for the lock acquisition.

C.

The lock () method returns a boolean indicator immediately if it has managed to acquire the lock, otherwise it waits for the lock acquisition.

D.

The Lock () method returns a boolean indicator immediately regardless if it has or has not managed to acquire the lock

Question 8

Given:

Question # 8

What is the result?

Options:

A.

Bicycle =7, car=7, motorcycle=7, truck=7)

B.

(3:bicycle, 0:car, 0motercycle, 5:truck)

C.

(Bicycle, car, motorcycle, truck)

D.

Bicycle-1, car=3, motorcycle=1, truck=2)

E.

Compilation fails.

Question 9

Given:

Question # 9

Which statement is true while the program prints GC?

Options:

A.

Only the object referenced by t2 is eligible for garbage collection.

B.

Both the objects previously referenced by t1 are eligible for garbage collection.

C.

None of the objects are eligible for garbage collection.

D.

Only one of the objects previously referenced by t1 is eligible for garbage collection.

Question 10

Given:

Question # 10

What is the result

Options:

A.

Marketing

Finance

Technical

B.

Marketing

Undefined

C.

UnDefined

D.

Marketing

Question 11

Given the product class:

Question # 11

And the shop class:

Question # 11

What is the result?

Options:

A.

Cookie 2.99 2.99

B.

Cookie 3.99 2.99

C.

Cookie 0.0 0.0

D.

An exception is produced at runtime

E.

Compilation fails

F.

Cookie 0.0 2.99

Question 12

Given:

Question # 12

What is the result?

Options:

A.

Software Game Chess 0

B.

Software Game Software Game Chese 2

C.

Software game write error

D.

Software Game Software Game chess 0

E.

Software Game Chess 2

F.

Software Game read error

Question 13

Given the code fragment:

Question # 13

What is the result?

Options:

A.

Logged out at: 2021-0112T21:58:19.880z

B.

Logged out at: 2021-01-12T21:58:00z

C.

A compilation error occurs at Line n1.

D.

Can’t logout

Question 14

Given:

Question # 14

Which two should the module-info file include for it to represent the service provider interface?

Options:

A.

Requires cm.transport.vehicle,cars:

B.

Provides.com.transport.vehicle.cars.Car with com.transport.vehicle.cars. impt, CatImpI;

C.

Requires cm.transport.vehicle,cars:

D.

Provides.com.transport.vehicle.cars.Car impl,CarImp1 to com.transport.vehicle.cars. Cars

E.

exports com.transport.vehicle.cars.Car;

F.

Exports com.transport.vehicle.cars;

G.

Exports com.transport.vehicle;

Question 15

Given the code fragment:

Question # 15

What is the result:

Options:

A.

ADEABCB // the order of element is unpredictable

B.

ABCE

C.

ABCDE // the order of elements is unpredictable

D.

ABBCDE // the order of elements is unpredictable

Page: 1 / 5
Total 50 questions