Programming Languages, Java, Software Development, Software Engineering, Software Architecture.
needs a right side for inference, and the right side needs a left. Obviously, it won’t work. var example17 = a -> a.toUpperCase(); // won't work var example18 = String::toUpperCase; // won't work However, we can still use ‘var’ in a lambda expression as a parameter, but only starting from Java 11.