Monthly Archives: April 2006

Java Five-Oh #5: StringBuilder

If you are using Java 5 you should immediately replace StringBuffer with StringBuilder. By now everyone knows that you should never use the plus sign (+) to concatenate strings. As a rule of green thumb, if I concatenate more than five strings I do so using an instance of StringBuffer. When building a dynamic string [...]

Posted in Java, Programming, TechKnow | Leave a comment

Groovy Closures

I been writing some Groovy scripts recently. For the most part I have been writing small function that iterate over some list of maps. One great feature of Groovy is closures. Yeah, I know Ruby also has closures but for the following examples I will stick to Groovy. The following is a typical example of [...]

Posted in Java, Programming, TechKnow | Leave a comment