c = () -> "Hello World"; // Collection::contains is a simple unary method and its behavior is // clear from the context. A method reference is preferred here. appendFilter(goodStrings::contains); // A lambda expression is easier to understand than just tempMap::put in this case trackTemperature((time, temp) -> tempMap.put(time, temp));"> c = () -> "Hello World"; // Collection::contains is a simple unary method and its behavior is // clear from the context. A method reference is preferred here. appendFilter(goodStrings::contains); // A lambda expression is easier to understand than just tempMap::put in this case trackTemperature((time, temp) -> tempMap.put(time, temp));"> c = () -> "Hello World"; // Collection::contains is a simple unary method and its behavior is // clear from the context. A method reference is preferred here. appendFilter(goodStrings::contains); // A lambda expression is easier to understand than just tempMap::put in this case trackTemperature((time, temp) -> tempMap.put(time, temp));">
Runnable r = () -> System.out.println("Hello World");

Supplier<String> c = () -> "Hello World";

// Collection::contains is a simple unary method and its behavior is
// clear from the context. A method reference is preferred here.
appendFilter(goodStrings::contains);

// A lambda expression is easier to understand than just tempMap::put in this case
trackTemperature((time, temp) -> tempMap.put(time, temp));