instanceof的使用

2018-08-31  本文已影响0人  louiema1n

在父类的方法中需要判断当前调用者用

this

判断当前调用者是谁时用

this instanceof 子类名
上一篇 下一篇

猜你喜欢

热点阅读