What is the difference between a lambda expression and an anonymous inner class?
Which of the following statements about @FunctionalInterface is true?
Can a lambda expression have multiple statements in its body?
Which functional interface is best suited for this scenario: method that takes no parameters and returns a random number?
In Java streams, what does the filter() method use?
Advertisement
What will be the result of executing: List<Integer> nums = Arrays.asList(1, 2, 3, 4); nums.stream().map(x -> x * 2).collect(Collectors.toList());
Consider: Function<Integer, Integer> f = x -> x * x; What will f.apply(5) return?
What is the purpose of the Optional class when used with lambda expressions in Stream operations?
Which of the following lambda expressions is INCORRECT?
Consider: Stream.of(1, 2, 3, 4, 5).filter(x -> x > 2).map(x -> x * x). What will the terminal operation need to be?
What is method reference (::) in Java and how does it relate to lambda expressions?
What is the difference between peek() and forEach() when used with lambda expressions in Streams?
In the lambda expression (a, b) -> a.compareTo(b), what is the implicit functional interface?
What will be the output of: IntStream.range(1, 4).map(x -> x * 2).sum();
Consider: Stream.of(1, 2, 3, 4, 5).filter(x -> x > 2).map(x -> x * 2).forEach(System.out::println); What will be the output?
What is the difference between peek() and forEach() in streams?
What issue can arise when using lambda expressions with checked exceptions?
What will be the output of: IntStream.range(1, 4).map(x -> x * x).forEach(System.out::print);
In the lambda expression (a, b) -> a.compareTo(b), what can we infer about the parameters?
Which of the following correctly uses method reference with constructor?