Introduction to OOP Chapter 15: Overloading : next previous audio real text

Example Illustrating Redefinition Models

The following example will illustrate the difference in these two models.
class Parent {
	public void example (int a) 
		{ System.out.println("in parent method"); }
}

class Child extends Parent {
	public void example (int a, int b)
		{ System.out.println("in child method"); }
}

	Child aChild = new Child();
	aChild.example(3);
Will execute parent method in Java and C# (Merge model) and give error in C++ (hierarchical model). Delphi allows programmer control over this.
Intro OOP, Chapter 15, Slide 12