Pass the Oracle Java SE 1z0-819 Questions and answers with CertsForce

Viewing page 3 out of 9 pages
Viewing questions 21-30 out of questions
Questions # 21:

Given:

Question # 21

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 # 22:

Given:

Question # 22

What is the result?

Options:

A.

Orange Juice


B.

The compilation fails.


C.

Orange Juice Apple Pie Lemmon Ice Raspberry Tart


D.

The program prints nothing.


Questions # 23:

Given:

Question # 23

If file "App.config" is not found, what is the result?

Options:

A.

Configuration is OK


B.

The compilation fails.


C.

Exception in thread "main" java.lang.Error:Fatal Error: Configuration File, App.config, is missing.


D.

nothing


Questions # 24:

Given:

Question # 24

Which two are secure serialization of these objects? (Choose two.)

Options:

A.

Define the serialPersistentFields array field.


B.

Declare fields transient.


C.

Implement only readResolve to replace the instance with a serial proxy and not writeReplace.


D.

Make the class abstract.


E.

Implement only writeReplace to replace the instance with a serial proxy and not readResolve.


Questions # 25:

Given this requirement:

Module vehicle depends on module part and makes its com.vehicle package available for all other modules.

Which module-info.java declaration meets the requirement?

Question # 25

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


Questions # 26:

Given:

Question # 26

What is the result?

Options:

A.

watermelonorangelemongrapeapricotapple


B.

nothing


C.

appleapricotgrapelemonorangewatermelon


D.

appleorangegrapelemonapricotwatermelon


Questions # 27:

Given:

Question # 27

and

Question # 27

What is the result?

Options:

A.

A NullPointerException is thrown at run time.


B.

The compilation fails.


C.

1

Null

null


D.

1

1

1


E.

A ClassCastException is thrown at run time.


Questions # 28:

Given:

Question # 28

and

Question # 28

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) {...}


Questions # 29:

Given:

Question # 29

What is the result?

Options:

A.

9


B.

An exception is thrown at runtime.


C.

3


D.

6


Questions # 30:

You are working on a functional bug in a tool used by your development organization. In your investigation, you find that the tool is executed with a security policy file containing this grant.

Question # 30

What action should you take?

Options:

A.

Nothing, because it is an internal tool and not exposed to the public.


B.

Remove the grant because it is excessive.


C.

Nothing, because it is not related to the bug you are investigating.


D.

File a security bug against the tool referencing the excessive permission granted.


E.

Nothing, because listing just the required permissions would be an ongoing maintenance challenge.


Viewing page 3 out of 9 pages
Viewing questions 21-30 out of questions