Sep 2016 updated: Actualtests Oracle 1Z0-809 test preparation 41-50

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

2016 Sep 1Z0-809 Study Guide Questions:

Q41. Given the code fragment: 

Stream<Path> files = Files.walk(Paths.get(System.getProperty(“user.home”))); 

files.forEach (fName -> {//line n1 

try { 

Path aPath = fName.toAbsolutePath();//line n2 

System.out.println(fName + “:” 

+ Files.readAttributes(aPath, Basic.File.Attributes.class).creationTime 

()); 

} catch (IOException ex) { 

ex.printStackTrace(); 

}); 

What is the result? 

A. All files and directories under the home directory are listed along with their attributes. 

B. A compilation error occurs at line n1. 

C. The files in the home directory are listed along with their attributes. 

D. A compilation error occurs at line n2. 

Answer: A 

Q42. 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: D 

Q43. You have been asked to create a ResourceBundle which uses a properties file to localize an application. 

Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu? 

A. <key name = ‘menu1”>File Menu</key> <key name = ‘menu2”>View Menu</key> 

B. <key>menu1</key><value>File Menu</value> <key>menu2</key><value>View Menu</value> 

C. menu1, File Menu, menu2, View Menu 

D. menu1 = File Menu menu2 = View Menu 

Answer: B 

1Z0-809  testing engine

Improved 1Z0-809 exam question:

Q44. Given the code fragment: 

public class Foo { 

public static void main (String [ ] args) { 

Map<Integer, String> unsortMap = new HashMap< > ( ); 

unsortMap.put (10, “z”); 

unsortMap.put (5, “b”); 

unsortMap.put (1, “d”); 

unsortMap.put (7, “e”); 

unsortMap.put (50, “j”); 

Map<Integer, String> treeMap = new TreeMap <Integer, String> (new 

Comparator<Integer> ( ) { 

@Override public int compare (Integer o1, Integer o2) {return o2.compareTo 

(o1); } } ); 

treeMap.putAll (unsortMap); 

for (Map.Entry<Integer, String> entry : treeMap.entrySet () ) { 

System.out.print (entry.getValue () + “ “); 

What is the result? 

A. A compilation error occurs. 

B. d b e z j 

C. j z e b d 

D. z b d e j 

Answer: C 

Q45. Given the code fragment: 

List<String> str = Arrays.asList (“my”, “pen”, “is”, “your’, “pen”); Predicate<String> test = s -> { 

int i = 0; 

boolean result = s.contains (“pen”); 

System.out.print(i++) + “:”); 

return result; 

}; 

str.stream() 

.filter(test) 

.findFirst() 

.ifPresent(System.out ::print); 

What is the result? 

A. 0 : 0 : pen 

B. 0 : 1 : pen 

C. 0 : 0 : 0 : 0 : 0 : pen 

D. 0 : 1 : 2 : 3 : 4 : 

E. A compilation error occurs. 

Answer: E 

Q46. Given: 

What is the result? 

A. Red 0 Orange 0 Green 3 

B. Red 0 Orange 0 Green 6 

C. Red 0 Orange 1 

D. Green 4 

E. Compilation fails 

Answer: E 

certleader.com

Realistic 1Z0-809 dump:

Q47. Given: 

class Worker extends Thread { 

CyclicBarrier cb; 

public Worker(CyclicBarrier cb) { this.cb = cb; } 

public void run () { 

try { 

cb.await(); 

System.out.println(“Worker…”); 

} catch (Exception ex) { } 

class Master implements Runnable { //line n1 

public void run () { 

System.out.println(“Master…”); 

and the code fragment: 

Master master = new Master(); 

//line n2 

Worker worker = new Worker(cb); 

worker.start(); 

You have been asked to ensure that the run methods of both the Worker and Master classes are executed. 

Which modification meets the requirement? 

A. At line n2, insert CyclicBarrier cb = new CyclicBarrier(2, master); 

B. Replace line n1 with class Master extends Thread { 

C. At line n2, insert CyclicBarrier cb = new CyclicBarrier(1, master); 

D. At line n2, insert CyclicBarrier cb = new CyclicBarrier(master); 

Answer: B 

Q48. Given: What is the result? 

A. 100 210 

B. Compilation fails due to an error in line n1 

C. Compilation fails due to an error at line n2 

D. Compilation fails due to an error at line n3 

Answer: C 

Q49. Given: 

public class Foo<K, V> { 

private K key; 

private V value; 

public Foo (K key, V value) (this.key = key; this value = value;) 

public static <T> Foo<T, T> twice (T value) (return new Foo<T, T> (value, value); ) 

public K getKey () (return key;) 

public V getValue () (return value;) 

Which option fails? 

A. Foo<String, Integer> mark = new Foo<String, Integer> (“Steve”, 100); 

B. Foo<String, String> pair = Foo.<String>twice (“Hello World!”); 

C. Foo<?, ?> percentage = new Foo <> (97, 32); 

D. Foo<String, String> grade = new Foo <> (“John”, “A”); 

Answer: C 

Q50. Which two statements are true about localizing an application? 

A. Support for new regional languages does not require recompilation of the code. 

B. Textual elements (messages and GUI labels) are hard-coded in the code. 

C. Language and region-specific programs are created using localized data. 

D. Resource bundle files include data and currency information. 

E. Language codes use lowercase letters and region codes use uppercase letters. 

Answer: A,E 

Reference: http://docs.oracle.com/javase/7/docs/technotes/guides/intl/ 

About 1Z0-809 Information: 1Z0-809 Dumps

Certleader Dumps
Certleader is a company specialized on providing high quality IT exam materials and fully committed to assist our respected clients crack any IT certification tests on their 1st efforts.