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

What will be the result of compiling and running the following Java program?

class Bird {
    void fly() {
        System.out.println("Bird is flying");
    }
}

class Peacock extends Bird {
}

public class Test {
    public static void main(String[] args) {
        Peacock peacock = new Peacock();
        peacock.fly();
    }
}