判断一个对象是否实现了某个接口

if(对象名 instanceof 接口名){

}

猜你喜欢

转载自blog.csdn.net/qq_38006520/article/details/81749341