Determining class with a Java instanceOf example - 032

Published: 08 September 2015
on channel: Deege
6,342
122

What if we need to know the specific class for an instance in our list? In this lesson we're going to take a quick look at how we can determine the class of an instance.

When we need to test an instance to see what class it belongs to, we can use the keyword instanceof. This keyword acts as a binary operator. It takes an instance and a class as the two operators. The instance is any object variable, and class is any java.lang.Class object.

Transcript and code: http://www.deegeu.com/java-instanceof...

This video is part of a larger free online class called Free Java Course Online. You can find more information about this class on http://www.deegeu.com/free-java-cours...

Concepts: Java, Programming, instanceof, class, instance

Social Links: Don't hesitate to contact me if you have any further questions.
WEBSITE : dj@deegeu.com
TWITTER :   / deege  
FACEBOOK:   / deegeu.programming.tutorials  
GOOGLE+ : http://google.com/+Deegeu-programming...

About Me: http://www.deegeu.com/about-programmi...

Related Videos:

Free Java Course Online
   • Free Java course online for beginners  

If You Watch 1 Playlist About Java Classes Watch this One!
   • If You Watch 1 Playlist About Java Classes...  

Media credits: All images are owned by DJ Spiess unless listed below

Background from pixabay.com


On this page of the site you can watch the video online Determining class with a Java instanceOf example - 032 with a duration of hours minute second in good quality, which was uploaded by the user Deege 08 September 2015, share the link with friends and acquaintances, this video has already been watched 6,342 times on youtube and it was liked by 122 viewers. Enjoy your viewing!