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

What will be the output of the code above?

class Animal {
    protected void makeSound() {
        System.out.println("Animal sound");
    }
}

class Dog extends Animal {
    public void bark() {
        makeSound();
    }
}

public class Main {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.bark();
    }
}