Cause all that matters here is passing the Oracle 1z0-808 exam. Cause all that you need is a high score of 1z0-808 Java SE 8 Programmer I exam. The only one thing you need to do is downloading Ucertify 1z0-808 exam study guides now. We will not let you down with our money-back guarantee.

2021 Sep 1z0-808 practice exam

Q1. Given the following code for the classes MyException and Test: 


What is the result? 

A. A 

B. B 

C. Either A or B 

D. A B 

E. A compile time error occurs at line n1 

Answer: B 


Q2. 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 


Q3. Which two items can legally be contained within a java class declaration? 

A. An import statement 

B. A field declaration 

C. A package declaration 

D. A method declaration 

Answer: B,D 

Reference: 

http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html 


Q4. Given: 


The class is poorly encapsulated. You need to change the circle class to compute and return the area instead. 

Which two modifications are necessary to ensure that the class is being properly encapsulated? 

A. Remove the area field. 

B. Change the getArea( ) method as follows: 

public double getArea ( ) { return Match.PI * radius * radius; } 

C. Add the following method: 

public double getArea ( ) {area = Match.PI * radius * radius; } 

D. Change the cacess modifier of the SerRadius ( ) method to be protected. 

Answer: B,D 


Q5. Which two are Java Exception classes? 

A. SercurityException 

B. DuplicatePathException 

C. IllegalArgumentException 

D. TooManyArgumentsException 

Answer: A,C 


1z0-808  test engine

Latest 1z0-808 free download:

Q6. Given: 

public class Marklist { 

int num; 

public static void graceMarks(Marklist obj4) { 

obj4.num += 10; 

public static void main(String[] args) { 

MarkList obj1 = new MarkList(); 

MarkList obj2 = obj1; 

MarkList obj1 = null; 

obj2.num = 60; 

graceMarks(obj2); 

How many objects are created in the memory runtime? 

A. 1 

B. 2 

C. 3 

D. 4 

Answer: B 

Explanation: obj1 and obj3. 

when you do e2 = e1 you're copying object references - you're not making a copy of the object - and so the variables e1 and e2 will both point to the same object. 


Q7. Given: 

public class Equal { 

public static void main(String[] args) { 

String str1 = "Java"; 

String[] str2 = {"J","a","v","a"}; 

String str3 = ""; 

for (String str : str2) { 

str3 = str3+str; 

boolean b1 = (str1 == str3); 

boolean b2 = (str1.equals(str3)); 

System.out.print(b1+", "+b2); 

What is the result? 

A. true, false 

B. false, true 

C. true, true 

D. false, false 

Answer: B 

Explanation: == strict equality. equals compare state, not identity. 


Q8. Given: 


Which code fragment, when inserted at line 14, enables the code to print Mike Found? 

A. int f = ps.indexOf {new patient (“Mike”)}; 

B. int f = ps.indexOf (patient(“Mike”)); 

C. patient p = new Patient (“Mike”); int f = pas.indexOf(P) 

D. int f = ps.indexOf(p2); 

Answer: C 


Q9. Given the code fragment: 

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

int counter =0; 

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

counter++; 

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

counter++; 

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

counter++; 

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

counter++; 

System.out.print(counter); 

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. 


Q10. 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: A