Question from the Object-oriented programming - Fundamentals test

Which modification of the following code WILL NOT make the output be "success" ?

Hard

Which modification of the following code WILL NOT make the output be "success" ?

class A {
    public void talk() {
        echo "success"
    }
}


class B extends A {
    public void talk() {
        echo "fail"
    }
}

A a = new B();
a.talk();
Author: SamuelStatus: PublishedQuestion passed 551 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!