Category "method-reference"

Using method references as listeners with observer pattern

the usage of method references as listeners in an observer pattern does not work. Example: public class ObserverWithMethodReferenceAsListenerTest { cla

Why does it matter if I use a method reference or a lambda here?

When I try to compile this code import java.util.Optional; public class GenericTest { public static void main(String[] args) { Optional.empty().m