Proper study guides for Far out Oracle Java SE 8 Programmer I certified begins with Oracle 1z0-808 preparation products which designed to deliver the Best Quality 1z0-808 questions by making you pass the 1z0-808 test at your first time. Try the free 1z0-808 demo right now.

2017 Mar 1z0-808 sample question

Q81. Given the code fragment: 

public static void main(String[] args) { 

int iArray[] = {65, 68, 69}; 

iArray[2] = iArray[0]; 

iArray[0] = iArray[1]; 

iArray[1] = iArray[2]; 

for (int element : iArray) { 

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

A. 68, 65, 69 

B. 68, 65, 65 

C. 65, 68, 65 

D. 65, 68, 69 

E. Compilation fails 


Q82. A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the results? 

A. Compilation fails. 

B. The third argument is given the value null. 

C. The third argument is given the value void. 

D. The third argument is given the value zero. 

E. The third argument is given the appropriate falsy value for its declared type. F) An 

exception occurs when the method attempts to access the third argument. 


Q83. Given: 

public class Test1 { 

static void doubling (Integer ref, int pv) { 

ref =20; 

pv = 20; 

public static void main(String[] args) { 

Integer iObj = new Integer(10); 

int iVar = 10; 

doubling(iObj++, iVar++); 

System.out.println(iObj+ ", "+iVar); 

What is the result? 

A. 11, 11 

B. 10, 10 

C. 21, 11 

D. 20, 20 

E. 11, 12 


Explanation: The code doubling(iObj++, iVar++); increases both variables from to 10 to 


Q84. Given: 

What is the result? 

A. True false 

B. True null 

C. Compilation fails 

D. A NullPointerException is thrown at runtime 


Q85. Given: 

public class TestField { 

int x; 

int y; 

public void doStuff(int x, int y) { 

this.x = x; 

y =this.y; 

public void display() { 

System.out.print(x + " " + y + " : "); 

public static void main(String[] args) { 

TestField m1 = new TestField(); 

m1.x = 100; 

m1.y = 200; 

TestField m2 = new TestField(); 

m2.doStuff(m1.x, m1.y); 



What is the result? 

A. 100 200 : 100 200 

B. 100 0 : 100 0 : 

C. 100 200 : 100 0 : 

D. 100 0 : 100 200 : 


Down to date 1z0-808 free practice test:

Q86. Given the code fragment: 

Which three lines fail to compile? 

A. Line 7 

B. Line 8 

C. Line 9 

D. Line 10 

E. Line 11 

F. Line 12 

Answer: A,D,F 

Q87. Given: 

public class Test { 

public static void main(String[] args) { 

try { 

String[] arr =new String[4]; 

arr[1] = "Unix"; 

arr[2] = "Linux"; 

arr[3] = "Solarios"; 

for (String var : arr) { 

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

} catch(Exception e) { 

System.out.print (e.getClass()); 

What is the result? 

A. Unix Linux Solaris 

B. Null Unix Linux Solaris 

C. Class java.lang.Exception 

D. Class java.lang.NullPointerException 


Explanation: null Unix Linux Solarios 

The first element, arr[0], has not been defined. 

Q88. Given the code fragment: 

List colors = new ArrayList(); 








What is the result? 

A. [green, red, yellow, cyan] 

B. [green, blue, yellow, cyan] 

C. [green, red, cyan, yellow] 

D. Am IndexOutOfBoundsException is thrown at runtime 


Explanation: First the list [green, red, blue, yellow] is build. 

The blue element is removed: 

[green, red, yellow] 

Finally the element cyan is added at then end of the list (index 3). 

[green, red, yellow, cyan] 

Q89. Given the code fragment: 

Which modification enables the code fragment to print TrueDone? 

A. Replace line 5 With String result = "true"; Replace line 7 with case "true": 

B. Replace line 5 with boolean opt = l; Replace line 7 with case 1= 

C. At line 9, remove the break statement. 

D. Remove the default section. 


Q90. Given: 

Which two code fragments are valid? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

Answer: B,C 

Explanation: When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (C). 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.