instanceof

把子类转换为父类,向上转型,可直接

把父类转换为子类,向下转型,强转

a instanceof b  a和b是否父子关系

posted @ 2022-05-22 11:11  liulangde  阅读(59)  评论(0)    收藏  举报