instanceof是二元运算符,左边是对象,右边是类。
当对象是右边类或者其子类创建的对象时,返回ture,否则返回false
1 System.out.println(stu instanceof Student))