Lambda functions in Java in 5 minutes

You might already be familiar with Lambda expression if you are coming from Javascript or other non-natively typed languages. In those languages, you can just create a lambda expression (argument and return body) and treat it like a variable (you can pass it to methods and function arguments). Example in Js ES6:

// create ES6 anonymous function and use it
printer = (t) => console.log(t);