Fact 1 - Consider the methods has 2 parts: HEAD(public void nameOfMethod(Input input)) and BODY({Everything inside the keys}).
//without lambda you still use the HEAD as always.
public void printName() {
System.out.println(“Print without lambda”);
}
//The same code, but now with lambda you should just make the HEAD shorter letting just the signature there.
() -> System.out.println(“Print with lambda”);
//If have some inputs:
(valueString) -> {
System.out.println(valueString);
};
//or the parentheses are optional in this case:
valueString -> {
System.out.println(valueString);
};
You learned lambda expressions in 2 minutes, well done.