Question from the Object-oriented programming - Fundamentals test

How to call a method from a subclass in Java

Medium

What does this code return ?

public abstract class A {
    public abstract void talk();
}


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

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