Question from the Object-oriented programming - Fundamentals test

Compile error because implicit downcasting.

Hard

What is the result of this code ?

public class A {
    public void talk() {
        echo "Hello my name is A"
    }
}


public class B extends A {
    public void talk() {
        echo "Hello my name is B"
    }
}

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