instanceof Java Keyword Tutorial #90

preview_player
Показать описание

The instanceof keyword returns true if what's on the left is a class, subclass or interface of what's on the right. Like this:

someObject instanceof someClass;

This lets you quickly check if an object is related to another class or interface! I honestly don't use it very often, but it can be very helpful for certain situations.

I hope you enjoyed this instanceof java tutorial!

Disclosure: Springboard link provided is linked to my affiliate account & supports the channel.

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

I really appreciate the enthusiasm and clarity of your videos. I still have 2 years in my computing degree and i'm gonna be watching you a lot!!! keep up the great work!!
You're the reason i passed my Java & OOP year 1 exam!!
Can't thank you enough!!

shanT
Автор

Thank you Alex, you have helped me from no coding to good coding.

ricksanchez
Автор

I have recently started learning Java, and thanks to your videos I've progressed pretty quickly thanks to how well and simply you explain stuff, you deserve more recognition :)

clouds
Автор

your video are so good that I get the concept midway and exit, this is the third or fourth time this is happening. Thanks for saving our time and not giving us a lecture on bullshit, and getting to the point, saves a lot of time.

ayushmansanjeev
Автор

Thanks for teaching us. Clear explanination.

swamyas
Автор

This is actually something new to me in Java. Haven't learn it before. Thanks anyway

aimanhaziq
Автор

Hello.
I've just subscribe your channel. I'm learning computational thinking by using Java. You have a god collection of videos. I hope that you keep release new videos about Java.

jpedfonseca
Автор

Nice one! I started my YouTube channel too! You have got my inspired!

CodeWithMazn
Автор

hey alex i love your videos please keep going

salehasrorisuryaniwasmin
Автор

Amazing tutorial as always keep going man✌✌👍👍❤❤

saliadel
Автор

you are rocking that heart throb look man!

shadowoftiger
Автор

Your amazing man, this is the best and clear explanation I've ever watch.

christianmedalla
Автор

You have really helped me learn so much and I can't thank you enough

woahrajveer
Автор

You're an inspiration, Alex! Keep up the great work!

_stack
Автор

It's funny... I literally looked this up on Google a couple of hours ago to see if there was some keyword in Java that did this.

Foxsterdota
Автор

nice work. Instanceof is useful when using several implementations of an interface or class. if(instanceof Eagle) “screech“ else if (instanceof canary)”sing”.

geofflovig
Автор

Hey, Alex thanks for the great video. For the next one can you make a java and Database integration video, my entire class is watching you and this will save us thanks.

jonjondavidoff
Автор

Can you please do a video on Java naming conventions and tips, thank you

TheArsalan
Автор

I want to thank you again for everyting that you taught us.👍

rarez.
Автор

I hope you make a video about java reflection and java obfuscation

ICities