instanceof的使用

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

this

判断当前调用者是谁时用

this instanceof 子类名

你可能感兴趣的:(instanceof的使用)