Lambda Expressions in Java - Full Simple Tutorial

preview_player
Показать описание
Full tutorial for Lamba expressions in Java.

Lambdas in Java can be very confusing and hard to understand for a beginner Java learner, but they don't have to be. Lambda expressions allow you to create a method implementation as an object, and you can learn how in this tutorial.

Lambdas were introduced in Java 8, and are one of the coolest things in the Java language. By the end of this video, you'll know all about how Lambdas work, and how and when you can use them.

Learn or improve your Java by watching it being coded live!

Hi, I'm John! I'm a Lead Java Software Engineer and I've been in the programming industry for more than a decade. I love sharing what I've learned over the years in a way that's understandable for all levels of Java learners.

Let me know what else you'd like to see!

Links to any stuff in this description are affiliate links, so if you buy a product through those links I may earn a small commission.

📕 THE best book to learn Java, Effective Java by Joshua Bloch

📕 One of my favorite programming books, Clean Code by Robert Martin

🎧 Or get the audio version of Clean Code for FREE here with an Audible free trial

🖥️Standing desk brand I use for recording (get a code for $30 off through this link!)

📹Phone I use for recording:

🎙️Microphone I use (classy, I know):

Donate with PayPal (Thank you so much!)

☕Complete Java course:

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

One additional note - although lambdas do only work in the context of a functional interface, you don't necessarily need to always create your own in order to use one. There are many that are built into Java, and they cover most uses cases you'll see:

CodingWithJohn
Автор

The key point here like you say is lambdas allow method definitions to be used as variables/objects. Many other languages allow for function names to be passed as variables for callbacks and whatnot and Java never had a clean way to do that until lambdas. Only thing I would add to this is that putting the parameter type in the lambda expression is allowed and makes it easier to understand that the lambda is a method definition: (String p, String s) -> //code

danielcommins
Автор

I am always impressed by how good you are at making yourself understandable, your explanations are all clear and meaningful. It's definitely a privilege being able to access such a high quality content for free.

felipe
Автор

Hi, John,
I'm not a quick learner, but I work hard.
English is not my native language, and I watch and rewatch your videos a couple of times - and I can say: if you keep doing this amazing videos, I might learn some java.
I'm reading a java handbook right now, but next, I'll take your course.

andersonabe
Автор

My biggest "a-ha" moment here was when you showed how we go from public void print() {} to just () -> {}. Super intuitive, very good work!

djk
Автор

I've been doing Java based web application development for over 20 years. I often like to take refresher courses on things I've studied before. This is easily the best explanation with practical examples I've seen for Java Lambas. The concepts are clearly explained. Thanks John for making such a great video!

carlellis
Автор

Java receives a lot of backlash from inexperienced and experienced developers of being too old school, bloated and lacking modern features and syntax, although.. ever since I have started watching your videos, I've seen a major improvement and they are really trying to keep things up to date as of lambda expressions which provide more of a functional approach towards problems.
Turns out you just need a teacher like John to really appreciate and understand it. :)

raz
Автор

Please don't ever stop uploading. These videos help me in my academics and coding in general a lot. Thank You.

xsraut
Автор

When I first started coding, I have used Java and these videos have been a great refresher on the smaller and intricate things that Java has to offer. Great videos! Already learned so many things.

alexj
Автор

I've been using lambda for a while but it's the first time I understand how it works behind the scenes, thanks a lot for this video!

MaryamMaqdisi
Автор

I am currently studying computer sience and been literally devouring all of your videos, they have so much information, are easy to understand and have a good structure. Thank you.

ahmadhafian
Автор

I have been using lambdas for many years, first with Scala, then with Java, and watching your video, I am amazed how much I learned. Kudos to you for creating such as useful lesson...

EricKolotyluk
Автор

I appreciate how your videos get straight to the point. I tried watching a video from another channel about a Java topic and at least half of the video could have been edited out with no loss of meaningful information.

hyrumtanner
Автор

This course is a gem, concise, clear and thorough, thank you!

GuilhermePalazzoRodrigues
Автор

I found Lambda Expression is the exact same Arrow Function in JavaScript. I think it's usable in terms of functional programming but don't know whether there is a need of it in object oriented language like Java!
Thumbs up for you, indeed you are a great teacher.

robertzaryal
Автор

I had to watch dozens of videos to understand lambda expressions. Finally i found the right one. Thanks a ton 🙏

prathap
Автор

I have never seen anyone who can explain lambas expression as good as your. You help a lot for ppl who doesnt lambas.

dangnguyen.
Автор

You did in 5 minutes what my Uni prof. couldn't in two lectures. That goes to show how much people who actually use java professionally have a deeper understanding of java.

zipkitty
Автор

You are a phenomenal instructor - you saved my behind in data structures and algorithms and this was a great refresher on lambdas.

jilliansechrest
Автор

This was an excellent video! I have struggled to understand lambdas for a while and you just connected all the pieces that reading documentation and running examples cannot. Thank you!

curtisdevine