groovy interface Animal { void makeSound() } class Dog implements Animal { void makeSound() { } } class Cat implements Animal { void makeSound() { } } Animal dog = new Dog() Animal cat = new Cat()


上一篇:
下一篇:
切换中文