Exam Details

  • Exam Code
    :1Z0-816
  • Exam Name
    :Java SE 11 Programmer II
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :80 Q&As
  • Last Updated
    :

Oracle Oracle Certifications 1Z0-816 Questions & Answers

  • Question 51:

    Given:

    What action ensures successful compilation?

    A. Replace public Color(int c) with private Color(int c).

    B. Replace int c; with private int c;.

    C. Replace int c; with private final int c;.

    D. Replace enum Color implements Serializable with public enum Color.

    E. Replace enum Color with public enum Color.

  • Question 52:

    var numbers = List.of(0,1,2,3,4,5,6,7,8,9);

    You want to calculate the average of numbers.

    Which two codes will accomplish this? (Choose two.)

    A. double avg = numbers.stream().parallel().averagingDouble(a -> a);

    B. double avg = numbers.parallelStream().mapToInt (m -> m).average().getAsDouble();

    C. double avg = numbers.stream().mapToInt (i -> i).average().parallel();

    D. double avg = numbers.stream().average().getAsDouble();

    E. double avg = numbers.stream().collect(Collectors.averagingDouble(n -> n));

  • Question 53:

    Given:

    Which statement on line 1 enables this code fragment to compile?

    A. Function function = String::toUpperCase;

    B. UnaryOperator function = s -> s.toUpperCase();

    C. UnaryOperator function = String::toUpperCase;

    D. Function function = m -> m.toUpperCase();

  • Question 54:

    Given: You want to obtain the Stream object on reading the file. Which code inserted on line 1 will accomplish this?

    A. var lines = Files.lines(Paths.get(INPUT_FILE_NAME));

    B. Stream lines = Files.readAllLines(Paths.get(INPUT_FILE_NAME));

    C. var lines = Files.readAllLines(Paths.get(INPUT_FILE_NAME));

    D. Stream lines = Files.lines(INPUT_FILE_NAME);

  • Question 55:

    Given:

    Which is true?

    A. System.out is the standard output stream. The stream is open only when System.out is called.

    B. System.in cannot reassign the other stream.

    C. System.out is an instance of java.io.OutputStream by default.

    D. System.in is the standard input stream. The stream is already open.

  • Question 56:

    Given:

    and

    Which code fragment on line 1 makes the s1 set contain the names of all employees born before January 1, 1989?

    A. Option A

    B. Option B

    C. Option C

    D. Option D

  • Question 57:

    Given: Which statement is equivalent to line 1?

    A. double totalSalary = list.stream().map(e -> e.getSalary() * ratio).reduce(bo).ifPresent (p -> p.doubleValue());

    B. double totalSalary = list.stream().mapToDouble(e -> e.getSalary() * ratio).sum;

    C. double totalSalary = list.stream().map(Employee::getSalary * ratio).reduce(bo).orElse(0.0);

    D. double totalSalary = list.stream().mapToDouble(e -> e.getSalary() * ratio).reduce(starts, bo);

  • Question 58:

    Which two are successful examples of autoboxing? (Choose two.)

    A. String a = "A";

    B. Integer e = 5;

    C. Float g = Float.valueOf(null);

    D. Double d = 4;

    E. Long c = 23L;

    F. Float f = 6.0;

  • Question 59:

    Given:

    What code must you insert on Line 1 to enable the code to print Hello world?

    A. Hello.Greeting myG = new Hello.Greeting() myG.sayHi();

    B. Hello myH = new Hello(); Hello.Greeting myG = myH.new Greeting(); myG.sayHi();

    C. Hello myH = new Hello(); Hello.Greeting myG = myH.new Hello.Greeting(); myG.sayHi();

    D. Hello myH = new Hello(); Greeting myG = new Greeting(); myG.sayHi ();

  • Question 60:

    Which code fragment prints 100 random numbers?

    A. Option A

    B. Option B

    C. Option C

    D. Option D

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-816 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.