In this week's Diagnosing Java Code, Eric Allen discusses the bug pattern caused by these difficulties, outlining the symptoms when argument mismatches cause the wrong method to be invoked, and offering a few solutions to combat the problem. Components Security Unicode Usability Web arch. Inc. May 2001 Method dispatch in an object-oriented language such as the Java language, in which methods can be overloaded and overridden, can cause difficulties of code management in even moderately complex programs. In this week's Diagnosing Java Code, Eric Allen discusses the bug pattern caused by these difficulties, outlining the symptoms when argument mismatches cause the wrong method to be invoked, and offering a few solutions to combat the problem. Single events, when combined as an interacting unit, can demonstrate many more results than the sum of results from each event on its own.
Programs can be the same way.
With each new method added to a program, the set of possible flows of control through the program grows dramatically. With large programs, it can quickly grow out of control. Fast-track to the code Listing 1. Implementing immutable lists The starting point for our discussion Listing 2. Defining enforcement parameters for linked lists Writing constructors to force all instances of class LinkedList to be lists of String s Listing 3.