public class ClassA
{
//default constructor not shown ...
public void method1()
{ /* implementation of method1 */ }
}
public class ClassB : ClassA
{
//default constructor not shown ...
public void method1()
{ /* different implementation from method1 in ClassA*/ }
public void method2()
{ /* implementation of method2 */ }
}
The method1 method in ClassB is an example of
(A) method overloading.
(B) method overriding.
(C) polymorphism.
(D) information hiding.
(E) procedural abstraction.