package com.sf.day10;

public class Test01 {
    public static void main(String[] args) {
        Animal animal = new Animal() {
            @Override
            public void run(String name) {
                System.out.println("小东西"+name);
            }

            @Override
            public void eat(String food) {
                System.out.println("食物"+food);
            }
        };

        animal.run("zhangsan");
        animal.eat("水果");
    }
}
