Method references

Reference to an instance method of an arbitrary object of a particular type

ContainingType::methodName

Reference to a constructor

ClassName::new

Use Method reference

// Think of method references are shorthand expressions
// where argument(s) can be inferred
// General syntax is
// instance::methodName or Type::methodName
// When to use? Whenever you might use a lamdba expression
// just to pass a value through to a method
Instead of:
list.forEach(Foo foo -> foo.doSomething())
use:
list.forEach(Foo::doSomething)
If you have a method declared like:
map(Function<T, R> f) {...}
instead of lambda to map an element from a List<String>:
map(value -> value.toUpperCase())
use:
map(String::toUpperCase)