关于instanceof的理解

a instanceof B

是判断a是否为B的实例化的对象,B可以是直接的类,或者更高级的基类

posted @ 2023-03-08 21:39  北极有熊ovo  阅读(20)  评论(0)    收藏  举报