The target type of this expression must be a functional interface in MethodReferences

Because that’s a method reference, the usage is a bit different:

 Consumer<String> c = System.out::println;

The argument that the consumer takes (s) will be still passed to the println method.

here is Oracle’s tutorial on this.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)