0
What does a lambda expression mean?
I just completed Java course but still have no idea what it means.
2 ответов
+ 1
It's a function.
(x, y) -> x * y
is a lambda expression that's the same as a function
public int myFunction(int x, int y){ return x * y; }
Except that the lambda doesn't have a name, works on more than just `int`, and you can carry it around in variables easily.
+ 1
Oh! Okay:)