Spring Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Java SE 8 Programmer II

Last Update 8 hours ago Total Questions : 208

The Java SE 8 Programmer II content is now fully updated, with all current exam questions added 8 hours ago. Deciding to include 1z0-809 practice exam questions in your study plan goes far beyond basic test preparation.

You'll find that our 1z0-809 exam questions frequently feature detailed scenarios and practical problem-solving exercises that directly mirror industry challenges. Engaging with these 1z0-809 sample sets allows you to effectively manage your time and pace yourself, giving you the ability to finish any Java SE 8 Programmer II practice test comfortably within the allotted time.

Question # 61

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.

Question # 62

Given the code fragment:

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

List < Integer > list2 = Arrays.asList(15, 30);

//line n1

Which code fragment, when inserted at line n1, prints 10 20 15 30?

A.

Stream.of(list1, list2).flatMap(list - > list.stream()).forEach(s - > System.out.print(s + “ “));

B.

Stream.of(list1, list2).flatMap(list - > list.intStream()).forEach(s - > System.out.print(s + “ “));

C.

list1.stream().flatMap(list2.stream().flatMap(e1 - > e1.stream()).forEach(s - > System.out.println(s + “ “));

D.

Stream.of(list1, list2).flatMapToInt(list - > list.stream()).forEach(s - > System.out.print(s + “ “));

Go to page: