[Free] 2018(Mar) EnsurePass Passguide Oracle 1z0-809 Dumps with VCE and PDF 71-80

Ensurepass.com : Ensure you pass the IT Exams
2018 Mar Oracle Official New Released 1z0-809
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/1z0-809.html

Java SE 8 Programmer II

Question No: 71

Given:

Ensurepass 2018 PDF and VCE

What is the result?

  1. 0 Done

  2. First Exception Done

  3. Second Exception

  4. Done

    Third Exception

  5. Third Exception

Answer: B

Question No: 72

Which two reasons should you use interfaces instead of abstract classes?

  1. You expect that classes that implement your interfaces have many common methods or fields, or require access modifiers other than public.

  2. You expect that unrelated classes would implement your interfaces.

  3. You want to share code among several closely related classes.

  4. You want to declare non-static on non-final fields.

  5. You want to take advantage of multiple inheritance of type.

Answer: A,E

Reference: http://www.programmerinterview.com/index.php/java-questions/interface-vs- abstract-class/

Question No: 73

Given:

Ensurepass 2018 PDF and VCE

What is the result?

A. 10 : 22 : 20

B. 10 : 22 : 22

C. 10 : 22 : 6

D. 10 : 30 : 6

Answer: B

Question No: 74

Given the code fragment:

Ensurepass 2018 PDF and VCE

What is the result?

  1. Found Red Found Default

  2. Found Teal

  3. Found Red Found Blue Found Teal

  4. Found Red Found Blue Found Teal Found Default

  5. Found Default

Answer: B

Question No: 75

Given the code fragment:

Path file = Paths.get (“courses.txt”);

// line n1

Assume the courses.txt is accessible.

Which code fragment can be inserted at line n1 to enable the code to print the content of the courses.txt file?

  1. Listlt;Stringgt; fc = Files.list(file); fc.stream().forEach (s – gt; System.out.println(s));

  2. Streamlt;Stringgt; fc = Files.readAllLines (file); fc.forEach (s – gt; System.out.println(s));

  3. Listlt;Stringgt; fc = readAllLines(file); fc.stream().forEach (s – gt; System.out.println(s));

  4. Streamlt;Stringgt; fc = Files.lines (file); fc.forEach (s – gt; System.out.println(s));

Answer: B

Question No: 76

Given that /green.txt and /colors/yellow.txt are accessible, and the code fragment:

Path source = Paths.get(“/green.txt);

Path target = Paths.get(“/colors/yellow.txt);

Files.move(source, target, StandardCopyOption.ATOMIC_MOVE); Files.delete(source);

Which statement is true?

  1. The green.txt file content is replaced by the yellow.txt file content and the yellow.txt file is deleted.

  2. The yellow.txt file content is replaced by the green.txt file content and an exception is thrown.

  3. The file green.txt is moved to the /colors directory.

  4. A FileAlreadyExistsException is thrown at runtime.

Answer: D

Question No: 77

Given the code fragment:

Listlt;Integergt; list1 = Arrays.asList(10, 20); Listlt;Integergt; list2 = Arrays.asList(15, 30);

//line n1

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

  1. Stream.of(list1, list2)

    .flatMap(list -gt; list.stream())

    .forEach(s -gt; System.out.print(s ” “));

  2. Stream.of(list1, list2)

    .flatMap(list -gt; list.intStream())

    .forEach(s -gt; System.out.print(s ” “));

  3. list1.stream()

    .flatMap(list2.stream().flatMap(e1 -gt; e1.stream())

    .forEach(s -gt; System.out.println(s ” “));

  4. Stream.of(list1, list2)

.flatMapToInt(list -gt; list.stream())

.forEach(s -gt; System.out.print(s ” “));

Answer: C

Question No: 78

Given the code fragment:

public class Foo {

public static void main (String [ ] args) {

Maplt;Integer, Stringgt; unsortMap = new HashMaplt; gt; ( ); unsortMap.put (10, “z”);

unsortMap.put (5, “b”);

unsortMap.put (1, “d”);

unsortMap.put (7, “e”);

unsortMap.put (50, “j”);

Maplt;Integer, Stringgt; treeMap = new TreeMap lt;Integer, Stringgt; (new Comparatorlt;Integergt; ( ) {

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

treeMap.putAll (unsortMap);

for (Map.Entrylt;Integer, Stringgt; entry : treeMap.entrySet () ) { System.out.print (entry.getValue () ” “);

}

}

}

What is the result?

  1. A compilation error occurs.

  2. d b e z j

  3. j z e b d

  4. z b d e j

Answer: C

Question No: 79

Given:

public interface Moveablelt;Integergt; {

public default void walk (Integer distance) {System.out.println(“Walking”);) public void run(Integer distance);

}

Which statement is true?

  1. Moveable can be used as below:

    Moveablelt;Integergt; animal = n – gt; System.out.println(“Running” n); animal.run(100);

    animal.walk(20);

  2. Moveable can be used as below: Moveablelt;Integergt; animal = n – gt; n 10; animal.run(100);

    animal.walk(20);

  3. Moveable can be used as below:

    Moveable animal = (Integer n) – gt; System.out.println(n); animal.run(100);

    Moveable.walk(20);

  4. Movable cannot be used in a lambda expression.

Answer: B

Question No: 80

public class ForTest {

public static void main(String[] args) { int[] arrar = {1,2,3};

for ( foo ) {

}

}

}

Which three are valid replacements for foo so that the program will compiled and run?

  1. int i: array

  2. int i = 0; i lt; 1; i

  3. ;;

D. ; i lt; 1; i

E. ; i lt; 1;

Answer: A,B,C

100% Ensurepass Free Download!
Download Free Demo:1z0-809 Demo PDF
100% Ensurepass Free Guaranteed!
1z0-809 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.