继承多态的简单代码
class Employee{
}
class Leader extends Employee{
}
public class App{
public static void main(String[] args){
Employee e=new Employee();
Leader l=new Leader();
System.out.println(e instanceof Employee);
System.out.println(l instanceof Employee);
System.out.println(e instanceof Leader);
System.out.println(l instanceof Leader);
}
}