Test 1z0-808 is among the most treasured and demanded assessment in buying it arena. To move the following perform assessment 1z0-808 will not be easy although with our own guidance you might obvious 1z0-808 in a very primary likelihood. The experts which become practiced inside their job areas and have your choose to reach along at the maximum involving capacity and being successful they often use distinctive accreditation assessments for this reason. Practice assessments 1z0-808 will be reputable certification this ensure a persons businesses that youll be highly skilled, certified, and regular.

2017 Apr 1z0-808 exam prep

Q121. Given: 

public class TestOperator { 

public static void main(String[] args) { 

int result = 30 -12 / (2*5)+1; 

System.out.print("Result = " + result); 

What is the result? 

A. Result = 2 

B. Result = 3 

C. Result = 28 

D. Result = 29 

E. Result = 30 

Answer:


Q122. Given: 

A. a, e 

i, o 

B. a, e 

o, o 

C. e, e 

I, o 

D. e, e 

o, o 

Answer:


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


Q124. Given: 

What is the result? 

A. 6 7 8 

B. 7 8 9 

C. 0 1 2 

D. 6 8 10 

E. Compilation fails 

Answer:


Q125. 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:


Far out 1z0-808 exam question:

Q126. Given the code fragment: 

What is the result? 

A. A B C Work done 

B. A B C D Work done 

C. A Work done 

D. Compilation fails 

Answer:


Q127. Given: 

What is the result? 

A. 400 200 

B. 200 200 

C. 400 400 

D. Compilation fails. 

Answer:


Q128. Given: 

public class MainMethod { 

void main() { 

System.out.println("one"); 

static void main(String args) { 

System.out.println("two"); 

public static void main(String[] args) { 

System.out.println("three"); 

void mina(Object[] args) { 

System.out.println("four"); 

What is printed out when the program is excuted? 

A. one 

B. two 

C. three 

D. four 

Answer:


Q129. 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:

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 


Q130. Given: 

public class Test { 

public static void main(String[] args) { 

int arr[] = new int[4]; 

arr[0] = 1; 

arr[1] = 2; 

arr[2] = 4; 

arr[3] = 5; 

int sum = 0; 

try { 

for (int pos = 0; pos <= 4; pos++) { 

sum = sum + arr[pos]; 

} catch (Exception e) { 

System.out.println("Invalid index"); 

System.out.println(sum); 

What is the result? 

A. 12 

B. Invalid Index 

C. Invalid Index 

D. Compilation fails 

Answer:

Explanation: The loop ( for (int pos = 0; pos <= 4; pos++) { ), it should be pos <= 3, causes an exception, which is caught. Then the correct sum is printed.