By Lon Hosford
To avoid complicated digit hacking code to format numbers you can use the Java API NumberFormat and DecimalFormat classes among others. Here are tutorial links: