Java Lambda Expressions 1 - Understanding Lambda Expression in Java with an Example

preview_player
Показать описание
What is Lambda Expression in Java?

A lambda expression implements a functional interface. 

Another way to look at it is, a lambda expression is an anonymous method that you can pass to other methods.

In Functional Programming - the idea is that we can treat code/function just like data and that we can pass a piece of code or function to another method. This is the main concept of functional programming. Lambda expressions help you to adopt the functional programming style in Java.

00:00 What is Lambda Expressions in Java
02:23 Understanding Lambda Expression in Java with an Example

#Java #LambdaExpressions #FunctionalProgramming
Рекомендации по теме
Комментарии
Автор

Very detailed explanation. I ended up watching all the videos in this course. Thanks for this free course.

fullstack
Автор

Thanks for amazing explanation, If you dont mind could you please share the sources code for the examples? thanks in advance

mel
Автор

Is helpful to zoom in the expression of lambda code

edwinarias
Автор

Very good explanation. Maybe you can help me out with my Lambda. It's like this.

private String[] getFolderNames(String basePath) {
URL resource =
File file = new File(resource.getFile());
return file.list((current, name) -> new File(current, name).isDirectory());
}

I get null pointer not for file, but for the return. Any solutions?

TerminallyUnique