1z0-830 Exam Question 1

Which two of the following aren't the correct ways to create a Stream?
  • 1z0-830 Exam Question 2

    Given:
    java
    interface SmartPhone {
    boolean ring();
    }
    class Iphone15 implements SmartPhone {
    boolean isRinging;
    boolean ring() {
    isRinging = !isRinging;
    return isRinging;
    }
    }
    Choose the right statement.
  • 1z0-830 Exam Question 3

    Given:
    java
    package com.vv;
    import java.time.LocalDate;
    public class FetchService {
    public static void main(String[] args) throws Exception {
    FetchService service = new FetchService();
    String ack = service.fetch();
    LocalDate date = service.fetch();
    System.out.println(ack + " the " + date.toString());
    }
    public String fetch() {
    return "ok";
    }
    public LocalDate fetch() {
    return LocalDate.now();
    }
    }
    What will be the output?
  • 1z0-830 Exam Question 4

    Which of the following statements is correct about a final class?
  • 1z0-830 Exam Question 5

    Given:
    java
    DoubleStream doubleStream = DoubleStream.of(3.3, 4, 5.25, 6.66);
    Predicate<Double> doublePredicate = d -> d < 5;
    System.out.println(doubleStream.anyMatch(doublePredicate));
    What is printed?