♥♥ 2021 NEW RECOMMEND ♥♥

Free VCE & PDF File for Oracle 1z0-808 Real Exam (Full Version!)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 1z0-808 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/1z0-808-exam-dumps.html

Q101. Given the code fragment: 

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"; 

Answer:


Q102. Consider following interface. 

Which of the following will create instance of Runnable type? 

A. Runnable run = 0 -> {System.out.println("Run");} 

B. Runnable run = 0 -> System.outprintlnfRun"); 

C. Runnable run = 0 > System.outprintlnfRun"); 

D. Runnable run = > System.ouLprintlnfRun"}; 

E. None of the above. 

Answer:

Explanation: 

Option A is the correct answer. 

To create we have used following method with LocalDate class; 

public static LocalDate of(intyear, int month, intdayOfMonth) 

Here we need to remember that month is not zero based so if you pass 1 for month, then 

month will be January. 

Then we have used period object of 1 day and add to date object which makes current date 

to next day, so final output is 2015-03-27. Hence option A is correct. 


Q103. Given: 

What is the result? 

A. C B A 

B. C 

C. A B C 

D. Compilation fails at line n1 and line n2 

Answer:


Q104. Which statement best describes encapsulation? 

A. Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects. 

B. Encapsulation ensures that classes can be designed so that their methods are inheritable. 

C. Encapsulation ensures that classes can be designed with some fields and methods declared as abstract. 

D. Encapsulation ensures that classes can be designed so that if a method has an argument MyType x, any subclass of MyType can be passed to that method. 

Answer:


Q105. Given the code fragments: 

What is the result? 

A. Super Sub Sub 

B. Contract Contract Super 

C. Compilation fails at line n1 

D. Compilation fails at line n2 

Answer:


Q106. Given: 

public class X { 

static int i; 

int j; 

public static void main(String[] args) { 

X x1 = new X(); 

X x2 = new X(); 

x1.i = 3; 

x1.j = 4; 

x2.i = 5; 

x2.j = 6; 

System.out.println( 

x1.i + " "+ 

x1.j + " "+ 

x2.i + " "+ 

x2.j); 

What is the result? 

A. 3 4 5 6 

B. 3 4 3 6 

C. 5 4 5 6 

D. 3 6 4 6 

Answer:


Q107. 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. Invalid Divisor 

Exception in thread "main" java.lang.ArithmeticException: / by zero 

at test.Teagle.main(Teagle.java:14) 

Successful Division 1 

Answer:


Q108. Given the code fragment? 

public class Test { 

public static void main(String[] args) { 

Test t = new Test(); 

int[] arr = new int[10]; 

arr = t.subArray(arr,0,2); 

// insert code here 

Which method can be inserted at line // insert code here to enable the code to compile? 

A. public int[] subArray(int[] src, int start, int end) { 

return src; 

B. public int subArray(int src, int start, int end) { 

return src; 

C. public int[] subArray(int src, int start, int end) { 

return src; 

D. public int subArray(int[] src, int start, int end) { 

return src; 

Answer:


Q109. Given: 

How many MarkList instances are created in memory at runtime? 

A. 1 

B. 2 

C. 3 

D. 4 

Answer:


Q110. Given the code fragment: 

What is the result if the integer aVar is 9? 

A. 10 Hello world! 

B. 10 Hello universe! 

C. 9 Hello world! 

D. Compilation fails. 

Answer: