Laurie Harper wrote:

As a more general example, consider if you wrote all your code to use ArrayList and later found, after profiling, that you needed to switch to LinkedList for performance reasons. You'd have to update all your code -- including all the clients of all the methods that accepted or returned an ArrayList.

Conversely, if you coded to the List interface, you would only need to change the implementation code. All the client code would be unaffected. That's Dave's point about being able to switch X for Y with minimal impact.

That was a much better example than mine :) I could have typed so much less!

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to