1z0-809 Exam Question 151

Given the code fragment:

What is the result?
  • 1z0-809 Exam Question 152

    Which statement is true about the DriverManagerclass?
  • 1z0-809 Exam Question 153

    Given:
    public class product {
    int id; int price;
    public Product (int id, int price) {
    this.id = id;
    this.price = price;
    }
    public String toString() { return id + ":" + price; }
    }
    and the code fragment:
    List<Product> products = Arrays.asList(new Product(1, 10),
    new Product (2, 30),
    new Product (2, 30));
    Product p = products.stream().reduce(new Product (4, 0), (p1, p2) -> {
    p1.price+=p2.price;
    return new Product (p1.id, p1.price);});
    products.add(p);
    products.stream().parallel()
    .reduce((p1, p2) - > p1.price > p2.price ? p1 : p2)
    .ifPresent(System.out: :println);
    What is the result?
    2 : 30
  • 1z0-809 Exam Question 154

    Given the code fragment:

    Which statement can be inserted into line n1 to print 1,2; 1,10; 2,20;?
  • 1z0-809 Exam Question 155

    Given:
    Book.java:
    public class Book {
    private String read(String bname) { return "Read" + bname }
    }
    EBook.java:
    public class EBook extends Book {
    public class String read (String url) { return "View" + url }
    }
    Test.java:
    public class Test {
    public static void main (String[] args) {
    Book b1 = new Book();
    b1.read("Java Programing");
    Book b2 = new EBook();
    b2.read("http://ebook.com/ebook");
    }
    }
    What is the result?