It looks like you're new here. If you want to get involved, click one of these buttons!
abstract class Animal { abstract String talk(); } class Cat extends Animal { String talk() { return "Meow!"; } } class Dog extends Animal { String talk() { return "Woof!"; } } void letsHear(Animal a) { println(a.talk()); } void main() { letsHear(new Cat()); letsHear(new Dog()); } |
Comments
http://giderosmobile.com/forum/discussion/15/oop-in-gideros/p1