public class demo{ public static void main(String[] args){ String name = “hello”; boolean result = name instanceof String; System.out.println(result); } }
instanceof是判断类型,只能判断类和数组的类型