Skip to content

Up to date 1Z0-809 Exam Study Guides With New Update Exam Questions

Act now and download your Oracle 1Z0-809 test today! Do not waste time for the worthless Oracle 1Z0-809 tutorials. Download Up to the minute Oracle Java SE 8 Programmer II exam with real questions and answers and begin to learn Oracle 1Z0-809 with a classic professional.

2017 NEW RECOMMEND

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

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

Free Instant Download NEW 1Z0-809 Exam Dumps (PDF & VCE):
Available on:
http://www.certleader.com/1Z0-809-dumps.html

Q21. What is the proper way to defined a method that take two int values and returns their sum as an int value? 

A. int sum(int first, int second) { first + second; } 

B. int sum(int first, second) { return first + second; } 

C. sum(int first, int second) { return first + second; } 

D. int sum(int first, int second) { return first + second; } 

E. void sum (int first, int second) { return first + second; } 

Answer:

Q22. Given: 

public class Canvas implements Drawable { 

public void draw () { } 

public abstract class Board extends Canvas { } 

public class Paper extends Canvas { 

protected void draw (int color) { } 

public class Frame extends Canvas implements Drawable { 

public void resize () { } 

public interface Drawable { 

public abstract void draw (); 

Which statement is true? 

A. Board does not compile. 

B. Paper does not compile. 

C. Frame does not compile. 

D. Drawable does not compile. 

E. All classes compile successfully. 

Answer:

Q23. Given: 

class Sum extends RecursiveAction { //line n1 

static final int THRESHOLD_SIZE = 3; 

int stIndex, lstIndex; 

int [ ] data; 

public Sum (int [ ]data, int start, int end) { 

this.data = data; 

this stIndex = start; 

this. lstIndex = end; 

protected void compute ( ) { 

int sum = 0; 

if (lstIndex – stIndex <= THRESHOLD_SIZE) { 

for (int i = stIndex; i < lstIndex; i++) { 

sum += data [i]; 

System.out.println(sum); 

} else { 

new Sum (data, stIndex + THRESHOLD_SIZE, lstIndex).fork( ); 

new Sum (data, stIndex, 

Math.min (lstIndex, stIndex + THRESHOLD_SIZE) 

).compute (); 

and the code fragment: 

ForkJoinPool fjPool = new ForkJoinPool ( ); int data [ ] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} fjPool.invoke (new Sum (data, 0, data.length)); 

and given that the sum of all integers from 1 to 10 is 55. Which statement is true? 

A. The program prints several values that total 55. 

B. The program prints 55. 

C. A compilation error occurs at line n1. 

D. The program prints several values whose sum exceeds 55. 

Answer:

Q24. Given: 

What is the result? 

A. 10 : 22 : 20 

B. 10 : 22 : 22 

C. 10 : 22 : 6 

D. 10 : 30 : 6 

Answer:

Q25. Given the code fragment: 

int b = 3; 

if ( !(b > 3)) { 

System.out.println("square "); 

}{ 

System.out.println("circle "); 

System.out.println("…"); 

What is the result? 

A. square… 

B. circle… 

C. squarecircle… 

D. Compilation fails. 

Answer:

Q26. Given the code fragment: 

List<Integer> codes = Arrays.asList (10, 20); 

UnaryOperator<Double> uo = s -> s +10.0; 

codes.replaceAll(uo); 

codes.forEach(c -> System.out.println(c)); 

What is the result? 

A. 20.0 

30.0 

B. 10 20 

C. A compilation error occurs. 

D. A NumberFormatException is thrown at run time. 

Answer:

Q27. Given the code fragment 

Which code fragments, inserted independently, enable the code compile? 

A. t.fvar = 200; 

B. cvar = 400; 

C. fvar = 200; cvar = 400; 

D. this.fvar = 200; this.cvar = 400; 

E. t.fvar = 200; Test2.cvar = 400; 

F. this.fvar = 200; 

Test2.cvar = 400; 

Answer:

Q28. The protected modifier on a Field declaration within a public class means that the field ______________. 

A. Cannot be modified 

B. Can be read but not written from outside the class 

C. Can be read and written from this class and its subclasses only within the same package 

D. Can be read and written from this class and its subclasses defined in any package 

Answer:

Reference: 

http://beginnersbook.com/2013/05/java-access-modifiers/ 

Q29. Given the content of /resourses/Message.properties: 

welcome1=”Good day!” 

and given the code fragment: 

Properties prop = new Properties (); 

FileInputStream fis = new FileInputStream (“/resources/Message.properties”); 

prop.load(fis); 

System.out.println(prop.getProperty(“welcome1”)); 

System.out.println(prop.getProperty(“welcome2”, “Test”));//line n1 

System.out.println(prop.getProperty(“welcome3”)); 

What is the result? 

A. Good day! 

Test 

followed by an Exception stack trace 

B. Good day! 

followed by an Exception stack trace 

C. Good day! 

Test 

null 

D. A compilation error occurs at line n1. 

Answer:

Q30. Given: A. ns = 50 S = 125 ns = 125 S = 125 ns = 100 S = 125 

B. ns = 50 S = 125 ns = 125 S = 125 ns = 0 S = 125 

C. ns = 50 S = 50 ns = 125 S = 125 ns = 100 S = 100 

D. ns = 50 S = 50 ns = 125 S = 125 ns = 0 S = 125 

Answer: