الرجوع
تسجيل الدخول

What will the following code output?

class Animal {
    String shout() {
        return "Animal noise!";
    }
}
class Dog extends Animal {
    String shout() {
        return super.shout() + " Woof!";
    }
}
class Test {
    public static void main(String[] args) {
        Dog d = new Dog();
        System.out.println(d.shout());
    }
}