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

Ensurepass

QUESTION 81

Given the code fragment:

 

clip_image002

 

Which code fragment prints red: blue: small: medium?

 

clip_image004

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: D

 

 

 

 

 

QUESTION 82

Given:

 

clip_image006

 

What is the result?

 

A.

true:true

B.

true:false

C.

false:true

D.

false:false

 

Correct Answer: C

 

 

QUESTION 83

Given:

 

clip_image008

 

What is the result?

 

A.

6 7 8

B.

7 8 9

C.

0 1 2

D.

6 8 10

E.

Compilation fails

 

Correct Answer: A

 

 

QUESTION 84

Given:

 

public class Test {

 

public static void main(String[] args) {

 

int ax = 10, az = 30;

 

int aw = 1, ay = 1;

 

try {

 

aw = ax % 2;

 

ay = az / aw;

 

} catch (ArithmeticException e1) {

 

System.out.println(“Invalid Divisor”);

 

} catch (Exception e2) {

 

aw = 1;

 

System.out.println(“Divisor Changed”);

 

}

 

ay = az /aw; // Line 14

 

System.out.println(“Succesful Division ” + ay);

 

}

 

}

 

What is the result?

 

A.

Invalid Divisor

Divisor Changed

Successful Division 30

B.

Invalid Divisor

Successful Division 30

C.

Invalid Divisor

Exception in thread “main” java.lang.ArithmeticException: / by zero at test.Teagle.main(Teagle.java:14)

D.

< font face="Arial">Invalid Divisor

Exception in thread “main” java.lang.ArithmeticException: / by zero at test.Teagle.main(Teagle.java:14)

Successful Division 1

 

Correct Answer: C

 

 

QUESTION 85

Given the code fragment:

 

clip_image010

 

 

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

 

A.

String str2 = str1;

B.

String str2 = new String (str1);

C.

String str2 = sb1. toString ();

D.

String str2 = “Duke”;

 

Correct Answer: A

 

 

QUESTION 86

Given:

 

clip_image012

 

What is the result?

A.

myStr: 9009, myNum: 9009

B.

myStr: 7007, myNum: 7007

C.

myStr: 7007, myNum: 9009

D.

Compilation fails

 

Correct Answer: C

 

 

QUESTION 87

Given:

 

clip_image014

 

What is the output?

 

A.

1Z0

B.

1Z0-808

C.

An exception will be thrown.

D.

Compilation fails due to error at line 3.

E.

Compilation tails due to error at line 4.

 

Correct Answer: E

Explanation:

Option E is the correct answer.

Code fails to compile because there is no method called concert in StringBuilder class. The concert method is in String class. Hence option E is correct Here we should have used append method of StringBuilder class, in that case option B would be correct.

https://docs.oracle.com/javase/tutorial/java/data/buffers.html

 

 

QUESTION 88

Given the code fragment:

 

clip_image015

What could expression1 and expression2 be, respectively, in order to produce output ?, 16?

 

A.

+ +a, – -b

B.

+ +a, b- –

C.

A+ +, – – b

D.

A + +, b – –

 

Correct Answer: D

 

 

QUESTION 89

Given:

 

clip_image017

 

A.

Ym

Xm2

B.

Ym

Xm1

C.

Compilation fails

D.

A ClassCastException is thrown at runtime

 

Correct Answer: B

 

 

 

 

 

QUESTION 90

Given:

 

clip_image019

 

What is the result?

 

clip_image021

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

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.