JavaAntiPatterns

Collection of bad coding practices

Posts Tagged ‘string

Not taking advantage of ‘toString()’

with 2 comments

Overriding toString() method gives you a cheap way to provide human-readable labels for objects in output. When the objects are used in GUI containers, such as JLists or JTables, it allows to use the default models and renderers instead of writing the custom ones.

Read the rest of this entry »

Advertisements

Written by Alex

November 22, 2007 at 11:16 pm

Posted in Objects, Strings

Tagged with ,