Java instanceof 操作符 Java 条件运算符 Java instanceof 操作符实例2 Java instanceof 操作符 public class Test { public static void main(String args[]) { String name = "James"; // following will return true since name is type of String boolean result = name instanceof String; System.out.println( result ); } } Java 条件运算符 Java instanceof 操作符实例2