Want to know Examcollection java se 8 programmer i 1z0 808 Exam practice test features? Want to lear more about Oracle Java SE 8 Programmer I certification experience? Study Tested Oracle exam 1z0 808 answers to Refresh 1z0 808 practice test questions at Examcollection. Gat a success with an absolute guarantee to pass Oracle java se 8 programmer i 1z0 808 dumps (Java SE 8 Programmer I) test on your first attempt.


♥♥ 2017 NEW RECOMMEND ♥♥

Free VCE & PDF File for Oracle 1z0-808 Real Exam (Full Version!)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 1z0-808 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/1z0-808-exam-dumps.html

Q51. Given the code fragment: 

public class Test { 

static String[][] arr =new String[3][]; 

private static void doPrint() { 

//insert code here 

public static void main(String[] args) { 

String[] class1 = {"A","B","C"}; 

String[] class2 = {"L","M","N","O"}; 

String[] class3 = {"I","J"}; 

arr[0] = class1; 

arr[1] = class2; 

arr[2] = class3; 

Test.doPrint(); 

Which code fragment, when inserted at line //insert code here, enables the code to print 

COJ? 

A. int i = 0; 

for (String[] sub: arr) { 

int j = sub.length -1; 

for (String str: sub) { 

System.out.println(str[j]); 

i++; 

B. private static void doPrint() { 

for (int i = 0;i < arr.length;i++) { 

int j = arr[i].length-1; 

System.out.print(arr[i][j]); 

C. int i = 0; 

for (String[] sub: arr[][]) { 

int j = sub.length; 

System.out.print(arr[i][j]); 

i++; 

D. for (int i = 0;i < arr.length-1;i++) { 

int j = arr[i].length-1; 

System.out.print(arr[i][j]); 

i++; 

Answer:

Explanation: 

Incorrect: 

not A: The following line causes a compile error: 

System.out.println(str[j]); 

Not C: Compile erro line: 

for (String[] sub: arr[][]) 

not D: Output: C 


Q52. Given: 

What is the result? 

A. 10 20 30 40 

B. 0 0 30 40 

C. Compilation fails 

D. An exception is thrown at runtime 

Answer:


Q53. Given the code fragment: 

public class Test { 

public static void main(String[] args) { 

boolean isChecked = false; 

int arry[] = {1,3,5,7,8,9}; 

int index = arry.length; 

while ( <code1> ) { 

if (arry[index-1] % 2 ==0) { 

isChecked = true; 

<code2> 

System.out.print(arry(index]+", "+isChecked)); 

Which set of changes enable the code to print 1, true? 

A. Replacing <code1> with index > 0 and replacing <code2> with index--; 

B. Replacing <code1> with index > 0 and replacing <code2> with --index; 

C. Replacing <code1> with index > 5 and replacing <code2> with --index ; 

D. Replacing <code1> with index and replacing <code2> with --index ; 

Answer:

Explanation: 

Note: Code in B (code2 is --index;). also works fine. 


Q54. Given the following main method: 

What is the result? 

A. 5 4 3 2 1 0 

B. 5 4 3 2 1 

C. 4 2 1 

D. 5 

E. Nothing is printed 

Answer:

Explanation: 

Loop will run only once and after that num == 0 will break it After first cycle of the loop. 


Q55. Given: 

public class MyClass { 

public static void main(String[] args) { 

while (int ii = 0; ii < 2) { 

ii++; 

System.out.println("ii = " + ii); 

What is the result? 

A. ii = 1 ii = 2 

B. Compilation fails 

C. The program prints nothing 

D. The program goes into an infinite loop with no output 

E. The program goes to an infinite loop outputting: ii = 1 ii = 1 

Answer:

Explanation: The while statement is incorrect. It has the syntax of a for statement. 

The while statement continually executes a block of statements while a particular condition is true. Its syntax can be expressed as: 

while (expression) { statement(s) } The while statement evaluates expression, which must return a boolean value. If the expression evaluates to true, the while statement executes the statement(s) in the while block. The while statement continues testing the expression and executing its block until the expression evaluates to false. 

Reference: The while and do-while Statements 


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

Explanation: 

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 

https://docs.oracle.com/javase/tutorial/java/landl/polymorphism.html 


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


Q58. Given: 

What is the result? 

A. hEllOjAvA! 

B. Hello java! 

C. Out of limits hEllOjAvA! 

D. Out of limits 

Answer:


Q59. Given the code fragment: 

Assume that the system date is June 20, 2014. What is the result? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:


Q60. Given the class definitions: 

And the code fragment of the main() method, 

What is the result? 

A. Java Java Java 

B. Java Jeve va 

C. Java Jeve ve 

D. Compilation fails 

Answer: