Java Anonymous Inner Classes Explained in 6 Minutes

preview_player
Показать описание
Anonymous Inner Classes fully explained in just 6 minutes.
We'll also explain what Anonymous Inner Classes have to do with Bigfoot...

Anonymous inner classes can sound like a scary concept, but they're really pretty simple. We'll explain them in just a few minutes in this beginner Java tutorial video lesson.

What do Anonymous Inner Classes in Java have to do with bigfoot? You're about to find out.

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:

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

I’ve been in the industry for 8+ years and sometimes I forget the basics. Thank you very much for the effort. You are a brilliant teacher. Respect ✊ ❤️

ful
Автор

Excellent. I can hardly think of anything to add that wouldn't make it too long. Some people might think "Who needs this crap anymore, we have lambdas now and they are even neater!"
That is more than a little true, but here's a couple of restrictions on lambdas that don't apply to anonymous inner classes:
Lambdas can only be used with Single Abstract Method interfaces, and can only override that single abstract method itself.
An anonymous inner class, on the other hand can merrily override more than one method, or can do even more, tho it is a good idea not to get carried away. If there's too much in it, give that sucker a name.
An anonymous inner class can implement any interface, not just Single Abstract Method ones, again, best not to get too carried away with this but the language won't stop you, and can also subclass any abstract or concrete class if there's a good reason to.
So lambdas are great, but it would be premature to throw Anonymous Inner Classes out of your Java toolbox.

jvsnyc
Автор

That last "Grawlneenlnenleng" though😂

lost_mallu
Автор

Your lessons are prompt, easy to understand, and generally fun to watch. A perfect way for me to brush up my rusty Java skills. Keep up the good word!

a
Автор

How does this guy not have more subscribers? Straightforward, to the point explanations that are well presented, and importantly no needless filler. Just awesome, you've earned my like, sub and comment!

cmasenv
Автор

Ur carrying my uni courses so hard, thanks a lot man!

SiirCartierr
Автор

It's amazing how I can see and even use something fairly often and still gain insight here about what I'm really doing. Thanks.

hyrumtanner
Автор

Interviewer: So what is an anonymous class in java?
My brain: 2:21

achyuthraosathvick
Автор

can't thank you enough for your videos
i am starting a new job as a junior java programmer in May. I had used lots of your videos to prepare for the inverview and am using them now to prepare for the job itself. thanks :)

lfemzgw
Автор

These concepts are deep and no one teaches this indepth. Glad that I found this channel.

akashsonar
Автор

Great channel, super clear explanations, always clearly explaining something I didn’t quite understand before. Cheers

gregtomkins
Автор

You are one of the best teachers I have ever seen, you and another that I won't mention here out of respect. But I think that you videos are the clearest of any teacher that I have seen online, period. I love your videos.

KingSardius
Автор

You are really the best!!! Every single time I need help I come to see your videos and even if I m not 100% good with english you make it so easy to understand!! THANK YOU!

corygallego
Автор

I'm going to write an exam about Java tomorow. John, you are saving me from letting it be a total desaster. Your explanation style is wonderful and you have exactly the right amount of humor in your videos. Your explanations and your English is very good understandable, even for a non-native English speaker on level B2. I honestly watch your videos as they are the best to understand, motivating, not too long but have everything important in it. You are doing a great job! Thank you and please continue like that!

felixro
Автор

Best explanation ever, after going through many tutorials of Innerclass concept. You are one of the Best Teachers.

spiritualquest
Автор

Another great tutorial, thank you very much John!

JonasKeil
Автор

Sometime I confuse you with "programming with mosh". Big fan of both of you!

banujan.b
Автор

OHhh, so those are classes, good to know.
It's also nice to know there's a way to make a class that can only ever have one instance of itself, because I wanted that for something I want to do in the future, and will probably use it for many other things.

iIO_OIi
Автор

This is exactly what I was looking for. Thank you very much for your explanation, and nice Bigfoot btw

tharinduwijetunge
Автор

you are helping the java learner community a lot john. keep up the good work

nielltalwar