+ 2

How to learn lambdas?

I read about it but can't understand :/

10th Jul 2019, 5:09 AM
Alexandr
8 Answers
+ 1
https://www.youtube.com/playlist?list=PLqq-6Pq4lTTa9YGfyhyW2CqdtW9RtY-I3 This is super cool video series that teach you Lambdas in Java. This guy explains very well. I highly suggest you to watch this.
10th Jul 2019, 6:09 AM
Inl Happy
Inl Happy - avatar
+ 7
I guess, there are no lambdas in Java. Are you talking about python 3?
10th Jul 2019, 5:18 AM
Sarthak Pokhrel
Sarthak Pokhrel - avatar
10th Jul 2019, 1:40 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
Java 8???
10th Jul 2019, 5:19 AM
Alexandr
10th Jul 2019, 5:44 AM
Tibor Santa
Tibor Santa - avatar
0
There are Lambdas in Java. I suggest to check out some youtube videos. Thay are explaining easily and write code alongside teaching theory
10th Jul 2019, 6:07 AM
Inl Happy
Inl Happy - avatar
0
Lambdas are basically just functions, that you don't name. They should always return a value and are deleted after usage. It's like saying public static int foo (a, b, c) { return a+b-c; } But you don't care about all the stuff you don't need there. You just say (a, b, c) => { return a+b-c;} It is the same, but you spare all this unnecessary public static int foo You could also use the function foo for a lambda replacement like so: .filter(foo) instead of .filter((a) => { return (a == bar);}) But you can't use the lambda outside the function.
11th Jul 2019, 10:46 PM
Loeschzwerg