Inner classes, which became available with Java 1.1, come in four flavors: More like ... Now, to change the search algorithm, we can simply swap in a new class.
www.javaworld.com