Greetings! Before Java8, Java is a fully object oriented programming language. While most of the other programming languages introduces functional programming Java was in OOP way. Java8 introduces lot of features and lambdas are the biggest change that happened to the language so far. What is functional programming? It is a programming style that allows to program using expressions. With that we can create instance of a function and assign to a variable, pass functions to methods as arguments. Is OOP not enough? We can do everything without lambda expressions. But it help us to write better readable and maintainable codes. And also it gives us better support of multi-cores. In OOP we are not passing behaviors. We pass objects which have behaviors. In functional programming we can pass behaviors. Benefits of lambda expressions Parallel processing. Enable functional programming. Readable and concise. Syntax A lambda expression has 3 parts. Argument list Arrow t...
May all beings be happy, be well, be peaceful, and be free