package com.sf._03_接口入门案例;

public class Test {
    public static void main(String[] args) {
        /**
         * 多态可以出现在继承的关系中也可以出现在实现关系中
         * 继承  类于类之间关系
         * 实现  接口于类关系
         *
         */
        swim(new Dog());
        swim(new Frog());
        swim(new Fish());
//        swim(new Rabbit());
    }

    public static void swim(ISwim swim){
        swim.swimming();
    }
}
