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

Ensurepass

QUESTION 91

Which two are Java Exception classes?

 

A.

SercurityException

B.

DuplicatePathException

C.

IllegalArgumentException

D.

TooManyArgumentsException

 

Correct Answer: AC

 

 

QUESTION 92

Given the code fragment:

 

clip_image002[4]

 

What is the result?

 

A.

A B C

B.

A B C D E

C.

A B D E

D.

Compilation fails.

 

Correct Answer: C

 

&nbsp
;

 

 

 

 

 

 

QUESTION 93

Given:

 

public class FieldInit {

 

char c;

 

boolean b;

 

float f;

 

void printAll() {

 

System.out.println(“c = ” + c);

 

System.out.println(“c = ” + b);

 

System.out.println(“c = ” + f);

 

}

 

public static void main(String[] args) {

 

FieldInit f = new FieldInit();

 

f.printAll();

 

}

 

}

 

What is the result?

 

A.

c = null

b = false

f = 0.0F

B.

c = 0

b = false

f = 0.0f

C.

c = null

b = true

f = 0.0

D.

c =

b = false

f = 0.0

 

Correct Answer: D

 

 

 

 

 

 

 

 

QUESTION 94

Given the code fragment:

 

clip_image004[4]

 

What is the result?

 

A.

Found Red

Found Default

B.

Found Teal

C.

Found Red

Found Blue

Found Teal

D.

Found Red

Found Blue

Found Teal

Found Default

E.

Found Default

 

Correct Answer: B

 

 

QUESTION 95

Given the code in a file Traveler.java:

 

clip_image006[4]

 

And the commands:

 

Javac Traveler.java

Java Traveler Java Duke

 

What is the result?

 

A.

Happy Journey! Duke

B.

Happy Journey! Java

C.

An exception is thrown at runtime

D.

The program fails to execute due to a runtime error

 

Correct Answer: D

 

 

QUESTION 96

Given:

 

clip_image008[4]

 

Which inserted at line 11, will provide the following output?

 

[21, 15, 11]

 

A.

list.removelf(e > e%2 != 0);

B.

list.removelf(e -> e%2 != 0);

C.

Ust.removelf(e -> e%2 = 0);

D.

list.remove(e -> e%2 = 0);

E.

None of the above.

 

Correct Answer: C

Explanation:

In output we can see that only odd
numbers present, so we need to remove only even numbers to get expected output. From Java SE 8, there is new method call removelf which takes predicate object and remove elements which satisfies predicate condition. Predicate has functional method call take object and check if the given condition met or not, if met it returns true, otherwise false. Option C we have passed correct lambda expression to check whether the number is odd or even that matches to the functional method of predicate interface.

Option A is incorrect as it is invalid lambda expression. Option B is incorrect as it removes all odd numbers.

Option D is incorrect as there is no remove method that takes predicate as argument. https://docs.oracle.eom/javase/8/docs/api/java/util/ArrayList.html

 

 

QUESTION 97

Given the code fragment:

 

clip_image010[4]

 

What is the result?

 

A.

Values are : [EE, ME]

B.

Values are : [EE, EE, ME]

C.

Values are : [EE, ME, EE]

D.

Values are : [SE, EE, ME, EE]

E.

Values are : [EE, ME, SE, EE]

 

Correct Answer: E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

QUESTION 98

Given:

 

clip_image012[4]

 

And given the code fragment:

 

clip_image013[4]

 

What is the result?

 

A.

4W 100 Auto

4W 150 Manual

B.

Null 0 Auto

4W 150 Manual

C.

Compilation fails only at line n1

D.

Compilation fails only at line n2

E.

Compilation fails at both line n1 and line n2

 

Correct Answer: E

Explanation:

On line n1 implicit call to parameterized constructor is missing and n2 this() must be the first line.

 

 

 

 

QUESTION 99

Given the code fragment:

 

clip_image015[4]

 

Which three code fragments can be independently inserted at line nl to enable the code to print one?

 

A.

Byte x = 1;

B.

short x = 1;

C.

String x = “1”;

D.

Long x = 1;

E.

Double x = 1;

F.

Integer x = new Integer (“1”);

 

Correct Answer: ABF

 

 

QUESTION 100

Given:

 

clip_image017[4]

 

What is the result?

 

A.

A B C D

B.

A C D

C.

A B C

D.

A B D

E.

A B D C

 

Correct Answer: C

 

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.