April 26, 2005

An Efficient Method of String Concatenation

A good way to concatenate strings in a loop or when performing multiple concatenations, is to use the StringBuilder class: String s = “a”s+=”b”; //this is slowStringBuilder sb = new

Get All Locales Supported by the Java Runtime

This code segment returns all the locales supported by the Java Runtime: // ListSupportedLocales.javaimport java.util.*;// other code to go here.Locale[] localeList = Locale.getAvailableLocales( ); for (int i=0; i

Add Virtualization to Your Development Toolbox

t’s time again to open up your developer’s toolbox and make room for the new must-have tool, virtual machines. As a software consultant, I find myself traveling from customer to