[Free] Download New Updated (October 2016) Oracle 1Z0-808 Real Exam 121-130

Ensurepass

QUESTION 121

Given:

 

clip_image002

 

What is the result?

 

A.

The program prints nothing

B.

d

C.

A StringIndexOutOfBoundsException is thrown at runtime.

D.

AnArrayIndexOutOfBoundsException is thrown at runtime.

E.

A NullPointerException is thrown at runtime.

 

Correct Answer: C

 

 

QUESTION 122

Given the code fragment:

 

clip_image004

 

What is the result?

 

A.

10 8 6 4 2 0

B.

10 8 6 4 2

C.

AnArithmeticException is thrown at runtime

D.

The program goes into an infinite loop outputting: 10 8 6 4 2 0. . .

E.

Compilation fails

 

Correct Answer: B

QUESTION 123

Which three statements are benefits of encapsulation?

 

A.

Allows a class implementation to change without changing t he clients

B.

Protects confidential data from leaking out of the objects

C.

Prevents code from causing exceptions

D.

Enables the class implementation to protect its invariants

E.

Permits classes to be combined into the same package

F.

Enables multiple instances of the same class to be created safely

 

Correct Answer: ABD

 

 

QUESTION 124

Given:

 

clip_image006

 

Which code fragment, when inserted at line 7, enables the code print true?

 

clip_image008

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: A

 

 

QUESTION 125

Given:

 

clip_image010

 

What is the result?

 

A.

400 200

B.

200 200

C.

400 400

D.

Compilation fails.

 

Correct Answer: A

 

 

QUESTION 126

public class StringReplace {

 

public static void main(String[] args) {

 

String message = “Hi everyone!”;

 

System.out.println(“message = ” + message.replace(“e”, “X”)); }

 

}

 

What is the result?

 

A.

message = Hi everyone!

B.

message = Hi XvXryonX!

C.

A compile time error is produced.

D.

A runtime error is produced.

E.

message =

F.

message = Hi Xveryone!

Correct Answer: B

 

 

QUESTION 127

Which two are benefits of polymorphism?

 

A.

Faster code at runtime

B.

More efficient code at runtime

C.

More dynamic code at runtime

D.

More flexible and reusable code

E.

Code that is protected from extension by other classes

 

Correct Answer: CD

 

 

QUESTION 128

Given:

 

clip_image012

 

What is the result?

 

A.

2 4 6 8 10 12

B.

2 4 6 8 10 12 14

C.

Compilation fails

D.

The program prints multiple of 2 infinite times

E.

The program prints nothing

 

Correct Answer: B

 

 

 

 

 

 


 

 

QUESTION 129

Given:

 

clip_image014

 

And the commands:

 

Javac Test.java

 

Java Test 12345

 

What is the result?

 

A.

Number us : 12345

B.

A NullPointerException is thrown at runtime

C.

A NumberFormatException is thrown at runtime

D.

AnArrayIndexOutOfBoundException is thrown at runtime.

 

Correct Answer: A

 

 

QUESTION 130

Given the code format:

 

clip_image016

 

Which code fragment must be inserted at line 6 to enable the code to compile?

 

A.

DBConfiguration f;

return f;

B.

Return DBConfiguration;

C.

Return new DBConfiguration;

D.

Retutn 0;

 

Correct Answer: B

 

Free VCE & PDF File for Oracle 1Z0-808 Real Exam

Instant Access to Free VCE Files: CompTIA | VMware | SAP …
Instant Access to Free PDF Files: CompTIA | VMware | SAP …

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.