Exam Code: 1z0-808 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Java SE 8 Programmer I
Certification Provider: Oracle
Free Today! Guaranteed Training- Pass 1z0-808 Exam.

2016 Jul 1z0-808 testing engine

Q71. Given: 

What is the result? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D 

Q72. Given: 

Which of the following is equivalent to the above code fragment? 

A. System.out.printLn(x>10?">,': "<":,'="); 

B. System.out.println(x>10? ">"?"<":"="); 

C. System.out.println(x>10?">":x<10?"<":"="); 

D. System.out.printLn(x>10?">"?,'<"?"="); 

E. None of the above 

Answer: B 


Option A is incorrect as we can't use abstract with non abstract method, (here method has method body.) Option C is incorrect as when overriding method we can't use more restrictive access modifier, so trying to use private to override default access Level method causes a compile time error. Option D is incorrect as default methods (not methods with default access level) are allowed only in interfaces. Option E is incorrect as method all ready has void as return type, so we can't add int there. Option B is correct as we can use final there, since the method is non abstract 


Q73. Given: 

What is the result? 

A. 0 Done 

B. First Exception Done 

C. Second Exception 

D. Done Third Exception 

E. Third Exception 

Answer: B 

Q74. Given the code fragment: 

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] 

Answer: E 

Q75. Given the code fragment: 

String[] cartoons = {"tom","jerry","micky","tom"}; 

int counter =0; 

if ("tom".equals(cartoons[0])) { 


} else if ("tom".equals(cartoons[1])) { 


} else if ("tom".equals(cartoons[2])) { 


} else if ("tom".equals(cartoons[3])) { 



What is the result? 

A. 1 

B. 2 

C. 4 

D. 0 

Answer: A 

Explanation: Counter++ will be executed only once because of the else if constructs. 

1z0-808  book

Leading 1z0-808 practice:

Q76. Given the code format: 

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; 

Answer: B 

Q77. Given the code fragment: 

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 

Answer: B 

Q78. Given the code fragment: 

Which modification enables the code to print 54321? 

A. Replace line 6 with System, out. print (--x) ; 

B. At line 7, insert x --; 

C. Replace line 6 with --x; and, at line 7, insert system, out. print (x); 

D. Replace line 12 With return (x > 0) ? false: true; 

Answer: B 

Q79. Given: 

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. 

Answer: A 

Q80. Consider following method 

Which statement is true? 

A. This method is invalid. 

B. This method can be used only in an interface. 

C. This method can return anything. 

D. This method can be used only in an interface or an abstract class. 

E. None of above. 

Answer: B 


Given method is declared as default method so we can use it only inside an interface. 

Hence option B is correct and option D is incorrect. 

Option A is incorrect as it is valid method. Option C is incorrect as return type is void, which 

means we can't return anything.