We provide you with the 100% refund policy in case you fail the actual Oracle Oracle exam after utilizing our exam products. Or you are able to claim another Oracle Oracle exam dumps in the same value without charging any kind of fees. If you have another questions, please seek the online customer assistance for help. Our primary objective is your own success as well as satisfaction.

2016 Nov 1z0-808 test preparation

Q81. Given: 

interface Pet { } 

class Dog implements Pet { } 

public class Beagle extends Dog{ } 

Which three are valid? 

A. Pet a = new Dog(); 

B. Pet b = new Pet(); 

C. Dog f = new Pet(); 

D. Dog d = new Beagle(); 

E. Pet e = new Beagle(); 

F. Beagle c = new Dog(); 

Answer: A,D,E 

Explanation: 

Incorrect: 

Not B, not C: Pet is abstact, cannot be instantiated. 

Not F: incompatible type. Required Beagle, found Dog. 


Q82. Given: 

What is the result? 

A. The program prints nothing 

B. d 

C. A StringIndexOutOfBoundsException is thrown at runtime. 

D. AnArrayIndexOutOfBoundsException is thrown at runtime. 

E. A NullPointerException is thrown at runtime. 

Answer:


Q83. Given the code fragment: 

What is the result? 

A. 20 

B. 25 

C. 29 

D. Compilation fails 

E. AnArrayIndexOutOfBoundsException is thrown at runtime 

Answer:


Q84. Given: 

What would be the output, if it is executed as a program? 

A. name =, pass = 

B. name = null, pass = null 

C. name = null, pass = false 

D. name = null pass = true E. Compile error. 

Answer:

Explanation: 

Both name and pass variables are instance variables, and we haven't given them any 

values, so they take their default values. For Boolean default value is false and for string 

which is not a primitive type default is null So at line 7, null will printed as the value of the 

variable name, and at line 8 false will be printed. Hence Option C is correct. 

As explained above options A, B and D are incorrect. 

Code compiles fine so option E is incorrect. 

Reference: 

https://docs.oracle.com/javaseAutorial/java/javaOOAariables.html 


Q85. Which statement will empty the contents of a StringBuilder variable named sb? 

A. sb.deleteAll(); 

B. sb.delete(0, sb.size()); 

C. sb.delete(0, sb.length()); 

D. sb.removeAll(); 

Answer:


Down to date 1z0-808 testing engine:

Q86. Given the following class declarations: 

public abstract class Animal 

public interface Hunter 

public class Cat extends Animal implements Hunter 

public class Tiger extends Cat 

Which answer fails to compile? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

Answer:

Explanation: Look at the right side of the declaration ArrayLIst() rather than ArrayList 


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


Q88. Given: 

What is the result? 

A. Area is 6.0 

B. Area is 3.0 

C. Compilation fails at line n1 

D. Compilation fails at line n2. 

Answer:


Q89. Given: 

abstract class A1 { 

public abstract void m1(); 

public void m2() { System.out.println("Green"); } 

abstract class A2 extends A1 { 

public abstract void m3(); 

public void m1() { System.out.println("Cyan"); } 

public void m2() { System.out.println("Blue"); } 

public class A3 extends A2 { 

public void m1() { System.out.println("Yellow"); } 

public void m2() { System.out.println("Pink"); } 

public void m3() { System.out.println("Red"); } 

public static void main(String[] args) { 

A2 tp = new A3(); 

tp.m1(); 

tp.m2(); 

tp.m3(); 

What is the result? 

A. Yellow Pink Red 

B. Cyan Blue Red 

C. Cyan Green Red 

D. Compilation Fails 

Answer:


Q90. Given: 

Which option enables the code to compile? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: C,D