A compile-time error occurs because obj1 is declared as type C1 but instantiated as type C2. A compile-time error occurs because obj1 is declared as type C1 but instantiated as type C2. A A runtime error occurs because method m1 does not appear in C2. A runtime error occurs because method m1 does not appear in C2. B Method m1 is not executed because it does not appear in C2. Method m1 is not executed because it does not appear in C2. C Method m2 is executed from the subclass instead of the superclass because obj1 is instantiated as a C2 object. Method m2 is executed from the subclass instead of the superclass because obj1 is instantiated as a C2 object. D Method m2 is executed twice (once in the subclass and once in the superclass) because it appears in both classes

Respuesta :

Lanuel

The code segment doesn't produce the intended output (AB) because "method m1" was not executed since it does not appear in C2.

What is a method?

In computer programming, a method can be defined as sets of instruction or a block of executable codes that are used to break down a complex problem into small but manageable fragments.

Thus, methods are typically used by programmers to break down a complex problem into simple, small and manageable fragments. In this scenario, the code segment doesn't produce the intended output (AB) because "method m1" was not executed since it does not appear in C2.

Read more on methods here: brainly.com/question/25619349