♥♥ 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.exam.com/1z0-808-dumps.html


Cause all that matters here is passing the Oracle 1z0 808 dumps pdf exam. Cause all that you need is a high score of java se 8 programmer i 1z0 808 pdf Java SE 8 Programmer I exam. The only one thing you need to do is downloading Testking 1z0 808 book exam study guides now. We will not let you down with our money-back guarantee.

Q1. Given: 

public class Test { 

public static void main(String[] args) { 

int day = 1; 

switch (day) { 

case "7": System.out.print("Uranus"); 

case "6": System.out.print("Saturn"); 

case "1": System.out.print("Mercury"); 

case "2": System.out.print("Venus"); 

case "3": System.out.print("Earth"); 

case "4": System.out.print("Mars"); 

case "5": System.out.print("Jupiter"); 

Which two modifications, made independently, enable the code to compile and run? 

A. Adding a break statement after each print statement 

B. Adding a default section within the switch code-block 

C. Changing the string literals in each case label to integer 

D. Changing the type of the variable day to String 

E. Arranging the case labels in ascending order 

Answer: A,C 

Explanation: The following will work fine: 

public class Test { 

public static void main(String[] args) { 

int day = 1; 

switch (day) { 

case 7: System.out.print("Uranus"); break; 

case 6: System.out.print("Saturn"); break; 

case 1: System.out.print("Mercury"); break; 

case 2: System.out.print("Venus"); break; 

case 3: System.out.print("Earth"); break; 

case 4: System.out.print("Mars"); break; 

case 5: System.out.print("Jupiter"); break; 


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

Answer:


Q3. Given: 

A. a, e 

i, o 

B. a, e 

o, o 

C. e, e 

I, o 

D. e, e 

o, o 

Answer:


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


Q5. Given the code fragment: 

List colors = new ArrayList(); 

colors.add("green"); 

colors.add("red"); 

colors.add("blue"); 

colors.add("yellow"); 

colors.remove(2); 

colors.add(3,"cyan"); 

System.out.print(colors); 

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 

Answer:

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] 


Q6. Given the code fragments: 

What is the result? 

A. Super Sub Sub 

B. Contract Contract Super 

C. Compilation fails at line n1 

D. Compilation fails at line n2 

Answer:


Q7. Given: 

public class App { // Insert code here System.out.print("Welcome to the world of Java"); } } 

Which two code fragments, when inserted independently at line // Insert code here, enable the program to execute and print the welcome message on the screen? 

A. static public void main (String [] args) { 

B. static void main (String [] args) { 

C. public static void Main (String [] args) { 

D. public static void main (String [] args) { 

E. public void main (String [] args) { 

Answer: A,D 

Explanation: 

Incorrect: 

Not B: No main class found. 

Not C: Main method not found 

not E: Main method is not static. 


Q8. Given the code fragment: 

What is the result? 

A. 100 

B. 101 

C. 102 

D. 103 

E. Compilation fails 

Answer:


Q9. Given the code fragment: 

A. Super Sub Sub 

B. Contract Contract Super 

C. Compilation fails at line n1 

D. Compilation fails at line n2 

Answer:


Q10. Which statement best describes encapsulation? 

A. Encapsulation ensures that classes can be designed so that only certain fields and methods of an object are accessible from other objects. 

B. Encapsulation ensures that classes can be designed so that their methods are inheritable. 

C. Encapsulation ensures that classes can be designed with some fields and methods declared as abstract. 

D. Encapsulation ensures that classes can be designed so that if a method has an argument MyType x, any subclass of MyType can be passed to that method. 

Answer: