Java 8 Lambda Basics 7 - Lambda Expression Examples

PRESS TO DOWNLOAD:

— Handwritten subtitles — Generated subtitles

Start Reading:

let us now write a few more lambda expressions to flex our lambda muscles this is kind of practice to see what it takes to build these lambda expressions you know compared to the kind of functions that we are used to so for instance let start with the greet method so we had like a greeting function which was a lambda expression which looks something like this this is a empty list of arguments and the actual body of the function was system dot out dot print of hello world this is a lambda expression what this does is have a function inline which takes in no arguments and the body of the function just as systems are order print of hello world so this function is assigned to the variable called greening function alright now one thing that you must have noticed is I don have the type here what is the type of this variable feeling function let hold that thought for a bit I haven talked about the type of these lambda expressions yet I come at it a bit later but for now I want you to focus on just the right hand side here