Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object of_ref = Stream::of; // compile-time error
- java.util.function.Function of_ref = Stream::of;
- Object obj = of_ref; // compiles ok
- int x = 5;
- FunctionalInterface func = (x) -> System.out.println(x);
- public abstract void xxx(int value);
- Function<T, Stream<T>> of_ref = Stream::of;
- Function<T, Stream<T>> of_ref = new Function<T, Stream<T>>() {
- Stream<T> apply(T t) {
- return Stream.of(t);
- }
- };
- Object of_ref = Stream::of;
- Object of_ref = new [**What goes here?**]() {
- [**What method signature goes here?**] {
- return Stream.of(t);
- }
- };
- Object of_ref = list -> Stream.of(list);
- Object obj = (Function<?, ?>) Stream::of;
Add Comment
Please, Sign In to add comment