Java Lambdas
https://www.youtube.com/watch?v=tj5sLSFjVj4
- Lambdas in java can only be used with certain types of interfaces
- instead of passing in an implementation of class , pass it just implementation
it doesn't need method name , return type etc. ( just needs param and body )
for below
or can simplify further like below
can be used as
Lambda gives you ability to store method implementation into variables and passed into methods as parameters
can add 1 or 2 parameter
It can also return values


Comments
Post a Comment