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,16 @@
---
title: instanceof Operator
localeTitle: instanceof运算符
---
# `instanceof`运算符
`instanceof`运算符允许您检查`IS A`关系的有效性。如果在任何时候,我们不确定这一点,并且我们想在运行时验证这一点,我们可以执行以下操作:
```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
}
```
**注意** 如果将instanceof运算符应用于具有null值的任何变量则返回false。