Which functional interface is used for operations that take two arguments and return a single value?
What is a method reference (::) in Java?
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?
Advertisement
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?
What is the time complexity of reducing a stream with a stateful lambda operation?
Consider: Function<Integer, Function<Integer, Integer>> curried = a -> b -> a + b; What is this pattern called?
Which of the following correctly uses method reference with constructor?
What happens when a lambda expression references a local variable from its enclosing scope?
Consider: Stream.of(1, 2, 3).map(x -> { System.out.println(x); return x * 2; }).collect(Collectors.toList()); What will print?
What is the purpose of the @FunctionalInterface annotation in Java?
Which stream operation would you use to transform elements from one type to another?
What will be the output of: List<Integer> list = Arrays.asList(1, 2, 3); list.replaceAll(x -> x * 2); System.out.println(list);
Which of the following is a valid lambda expression in Java?
A lambda expression can only be used with which type of interface?
What is the return type of the lambda expression: (a, b) -> a > b?
Which of the following lambda expressions has incorrect syntax?
What will be the type of the lambda expression (x) -> x.toString()?