fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,14 @@
---
title: instanceof Operator
---
# `instanceof` operator
The `instanceof` operator allows you to check the validity of a `IS A` relationship. If at any point of time, we are not sure about this and we want to validate this at runtime, we can do the following:
```java
//assuming vehicle is an instance of Class `Car` the expression inside the 'if' will return true
if(vehicle instanceof Car){
//do something if vehicle is a Car
}
```
**Note**: If you apply the instanceof operator with any variable that has null value, it returns false.