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

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

Post Your Answers

User Email:

User Name:

Related Java SUB Links

Java SUB interview questions and answers for experienced and fresher