📜  实例 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.193000             🧑  作者: Mango

代码示例2
if (cobj instanceof Child) 
    System.out.println("cobj is instance of Child"); 
else
    System.out.println("cobj is NOT instance of Child"); 
    
// Source: https://www.geeksforgeeks.org/java-instanceof-and-its-applications/