Java 8 Lambda Basics 6 - Introducing Lambda Expressions


— Handwritten subtitles — Generated subtitles

Start Reading:

now does this solve this problem this is what I wanted to do right you wanted to pass in a behavior and then execute that behavior but it kind of does but I think there is some extra work that we are doing over here we are not just passing in a behavior we are passing a thing that has a behavior you know passing in a perform method there passing a greeting which has a method which is to perform wouldn it be cool if we had just an action being passed in rather than a class that it determines an action now here would it be cool if we just pass their action in and then this execute the action well lambdas set out to achieve just this lambdas lets you create these entities which are just functions they are called lambda expressions which are just functions which do not belong to a class they not methods of a class there are just functions which exist in isolation and here the best part those functions can be treated as values this is kind of confusing for somebody who totally used to object oriented programming and they haven done