Audit Range: 1z0-808?
Linked Certifications: Oracle
Out there Spoken languages: Speech, Japoneses, Oriental, Speaking spanish, Russian, Thai, German, Colonial
Audit Name : Java SE 8 Programmer I
Questions and Answers : [productnum] Q&As
Update Time period: [productupdatetime]
Cost:? [productprice]

2021 Sep 1z0-808 exam question

Q71. Given: 


What is the result? 

A. Red 0 

Orange 0 

Green 3 

B. Red 0 

Orange 0 

Green 6 

C. Red 0 

Orange 1 

D. Green 4 

E. Compilation fails 

Answer: E 


Q72. Given: 

public class TestLoop1 { 

public static void main(String[] args) { 

int a = 0, z=10; 

while (a < z) { 

a++; 

--z; 

} System.out.print(a + " : " + z); } } 

What is the result? 

A. 5 : 5 

B. 6 : 4 

C. 6 : 5 

D. 5 : 4 

Answer: A 


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


Q74. 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: C 


Q75. Given: 


What is the output? 

A. [21, 13, 11] 

B. [30] 

C. [] 

D. Compilation fails due to error at line 7 

E. Compilation tails due to error at line 10 

Answer: D 

Explanation: 

Option D is the correct answer. 

Code fails to compile as we can't use primitive for collections type, so in this code trying to 

use int at line 7, causes a compile error. We should have use wrapper. Integer there. So 

option D is correct. 

https://docs.oracle.eom/javase/8/docs/api/java/util/ArrayList.html 


2passeasy.com

Renew 1z0-808 dumps:

Q76. Which three are advantages of the Java exception mechanism? 

A. Improves the program structure because the error handling code is separated from the normal program function 

B. Provides a set of standard exceptions that covers all the possible errors 

C. Improves the program structure because the programmer can choose where to handle exceptions 

D. Improves the program structure because exceptions must be handled in the method in which they occurred 

E. Allows the creation of new exceptions that are tailored to the particular program being created 

Answer: A,C,E 


Q77. Given: 


What is the result? 

A. Good Day! Good Luck! 

B. Good Day! Good Day! 

C. Good Luck! Good Day! 

D. Good Luck! Good Luck! 

E. Compilation fails 

Answer: E 


Q78. Given the code fragment: 

// insert code here 

arr[0] = new int[3]; 

arr[0][0] = 1; 

arr[0][1] = 2; 

arr[0][2] = 3; 

arr[1] = new int[4]; 

arr[1][0] = 10; 

arr[1][1] = 20; 

arr[1][2] = 30; 

arr[1][3] = 40; 

Which two statements, when inserted independently at line // insert code here, enable the code to compile? 

A. int [] [] arr = null; 

B. int [] [] arr = new int [2]; 

C. int [] [] arr = new int [2] [ ]; 

D. int [] [] arr = new int [] [4]; 

E. int [] [] arr = new int [2] [0]; 

F. int [] [] arr = new int [0] [4]; 

Answer: C,E 


Q79. Given: 


What is the result? 

A. 11, 21, 31, 11, 21, 31 

B. 11, 21, 31, 12, 22, 32 

C. 12, 22, 32, 12, 22, 32 

D. 10, 20, 30, 10, 20, 30 

Answer: D 


Q80. Given: 


What is the output? 

A. 2015-03-27 

B. 2015-04-27 

C. 2015-02-27 D. Compilation fails due to error at line 6. 

E. Compilation fails due to error at line 8. 

Answer: A 

Explanation: 

To create we have used following method with LocalDate class; 

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

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. 

https://docs.oracle.com/javase/tutorial/datetime/iso/datetime.html