InstanceOf Operators
Learn about the instanceOf operator with the help of an example in this lesson.
We'll cover the following...
We'll cover the following...
These operators check whether an object is an instance of a class or a subclass. If a class implements an interface, that can also be checked.
Coding example: 53
Let us see the following example to understand how it works:
Code explanation
As you see in the above code, there are two classes and one interface. One is the parent class, and one is the child class. The parent class implements an interface. Check out the output to understand how it works.
Bitwise operators
When you design ...