instanceof keyword in java
- 17th Aug 2017
- 0
- 3262
- instanceof keyword in java with an example significance of instanceof operator when to use instanceof keyword
The ” instanceof ” keyword is used to check whether an object is an instance of a particular class or interface The instanceof in java is also known as type comparison operator because it compares the object or instance with type.It returns either true or false. Example Object score = new Integer(98); if (score instanceof […]