instanceof in Java

instanceof in Java

instanceof operator is used to check whether the object is an instance of the class or subclass or interface.

The instanceof is also known as type comparison operator because it compares the instance with type.
It returns either true or false.
instanceof operator with variable having null value, it returns false

By:
Date:0000-00-00 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher