Coding Fun Java Java Lambda Expressions #1 – The Basics

Java Lambda Expressions #1 – The Basics

Java Lambda Expressions are the closest you get in Java to having functions as objects. Java lambda expressions are similar to anonymous implementations of single method interfaces, but with a more concise syntax. Java lambda expressions are great for implementing small event listeners, callbacks, or for functional programming in Java, e.g. with the Java streams API.

There are several additional details to Java Lambda Expressions not covered here. They will be covered in subsequent videos….

Tags: , , , , , , ,

26 thoughts on “Java Lambda Expressions #1 – The Basics”

  1. Kamui Shirou says:

    How do you change the name of the variable from apply to returnValue2 at the same time in both places? It was at 15:18

  2. asif aftab says:

    Great tutorial, Thank you so much.

  3. J Belcher says:

    Thanks. I'm not sure I agree with your statement, "…are the closest …to having functions as objects". Functions have always been objects in Java and it has long provided a way for you to instantiate a Method object (in the reflect package) and invoke it. Certainly lambdas make it much easier than before and much more standardized. Perhaps I'm just misunderstanding you statement.

  4. Vali Mikleu says:

    Excellent! Can we have as simple and nice tutorial about streams please ? Thank you !

  5. Charisma says:

    Thank you very much.

  6. Albvs says:

    Best lambda tutorial I've seen. After reading lots of articles I've finally understood the concept of lambda expressions thanks to your tutorial! Cheers

  7. N O says:

    Thanks Jakob Jenkov for this great video!

  8. Sean Dougan says:

    That is amazing; I knew of anonymous. inner and local classes but never knew I could implement an interface declaratively this way – very nice

  9. Sha-Zap says:

    Very helpful, thank you!

  10. Very concise explanation, lambdas had driven me crazy before. Most explanations try to get far too fancy to be understandable. This was precisely what I needed. Thanks.

  11. Diego Ramos says:

    Hi Jakob, first of all thanks for the video, I have one question, does Lambda in Java compare to Scala programming language ? thank you.

  12. Great explanation, thanks!

  13. Dan 330 says:

    I liked the tutorial but cmon light theme?

  14. K Badsha says:

    I would pay you money to teach me proper advanced Java — brilliant!

  15. blitzer says:

    how did you do that at 2:03

  16. You have saved my life

  17. S Kaczmarek says:

    Good Explanation! Thank you!

  18. riwjin says:

    Thanks for the tutorial! However, it would be nice if you could turn up the volume input. Even after I turned my volume to 100 I still cannot hear you very well.

  19. Flz Huang says:

    Thanks for these tutorial, very helpful!!

  20. Arceus says:

    Your tutorials are awesome! Well explained and backed with good examples, keep it up 🙂

  21. Roman says:

    Thank you for the tutorial, well explained 🙂

  22. what Only says:

    Best explanation of lambdas found so far. Oracle made it really hard to understand on their own site xD

Leave a Reply

Your email address will not be published. Required fields are marked *