No, that will just work fine. If your program was multi-threaded, it could be a problem. I don't know about DecimalFormat, but for example SimpleDateFormat is not multi-threading safe.
There are multiple ways to make this thread-safe. You already made your format() method synchronized, which is one way.
Another way is to use ThreadLocal. When you do this, a separate DecimalFormat object will be created for each
thread that calls your method. Your code would have to look like this:
See the API documentation for class ThreadLocal if you are interested in this approach.
[ July 04, 2007: Message edited by: Jesper Young ]