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.

2021 Jul 1z0-808 free exam

Q81. Given: 


What is the result? 

A. 400 200 

B. 200 200 

C. 400 400 

D. Compilation fails. 

Answer: A 


Q82. Given: 


Which two classes use the shape class correctly? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

F. Option F 

Answer: B,E 

Explanation: When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (E). However, if it does not, then the subclass must also be declared abstract (B). Note: An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. 


Q83. Given: 

public class Natural { 

private int i; 

void disp() { 

while (i <= 5) { 

for (int i=1; i <=5;) { 

System.out.print(i + " "); 

i++; 

i++; 

public static void main(String[] args) { 

new Natural().disp(); 

What is the result? 

A. Prints 1 2 3 4 5 once 

B. Prints 1 3 5 once 

C. Prints 1 2 3 4 5 five times 

D. Prints 1 2 3 4 5 six times 

E. Compilation fails 

Answer: D 

Explanation: 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 


Q84. Given: 


What is the result? 

A. True false 

B. True null 

C. Compilation fails 

D. A NullPointerException is thrown at runtime 

Answer: A 


Q85. Given: 


What is the result? 

A. Marrown 

String out of limits 

JesOran 

B. Marrown 

String out of limits 

Array out of limits 

C. Marrown 

String out of limits 

D. Marrown 

NanRed 

JesOran 

Answer: A 


2passeasy.com

Updated 1z0-808 exam answers:

Q86. Given: 


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


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A 


Q87. Given: 

public class Painting { 

private String type; 

public String getType() { 

return type; 

public void setType(String type) { 

this.type = type; 

public static void main(String[] args) { 

Painting obj1 = new Painting(); 

Painting obj2 = new Painting(); 

obj1.setType(null); 

obj2.setType("Fresco"); 

System.out.print(obj1.getType() + " : " + obj2.getType()); 

What is the result? 

A. : Fresco 

B. null : Fresco 

C. Fresco : Fresco 

D. A NullPointerException is thrown at runtime 

Answer: B 


Q88. Given the code fragment: int[] array = {I, 2, 3, 4, 5}; And given the requirements: 

Process all the elements of the array in the order of entry. 

Process all the elements of the array in the reverse order of entry. 

Process alternating elements of the array in the order of entry. 

Which two statements are true? 

A. Requirements 1, 2, and 3 can be implemented by using the enhanced for loop. 

B. Requirements 1, 2, and 3 can be implemented by using the standard for loop. 

C. Requirements 2 and 3 CANNOT be implemented by using the standard for loop. 

D. Requirement 1 can be implemented by using the enhanced for loop. 

E. Requirement 3 CANNOT be implemented by using either the enhanced for loop or the standard for loop. 

Answer: D,E 


Q89. int i, j=0; 

i = (3* 2 +4 +5 ) ; 

j = (3 * ((2+4) + 5)); 

System.out.println("i:"+ i + "nj":+j); 

What is the result? 


A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: B 


Q90. Given: 

class Mid { 

public int findMid(int n1, int n2) { 

return (n1 + n2) / 2; 

public class Calc extends Mid { 

public static void main(String[] args) { 

int n1 = 22, n2 = 2; 

// insert code here 

System.out.print(n3); 

Which two code fragments, when inserted at // insert code here, enable the code to compile and print 12? 

A. Calc c = new Calc(); int n3 = c.findMid(n1,n2); 

B. int n3 = super.findMid(n1,n3); 

C. Calc c = new Mid(); int n3 = c.findMid(n1, n2); 

D. Mid m1 = new Calc(); int n3 = m1.findMid(n1, n2); 

E. int n3 = Calc.findMid(n1, n2); 

Answer: A,D 

Explanation: 

Incorrect: 

Not B: circular definition of n3. 

Not C: Compilation error. line Calc c = new Mid(); 

required: Calc 

found: Mid 

Not E: Compilation error. line int n3 = Calc.findMid(n1, n2); 

non-static method findMid(int,int) cannot be referenced from a static context