In a single threaded environment, that would be safe, but if you plan on allowing your application to run with multiple threads it is no longer safe. From the NumberFormat API:
Synchronization
Number formats are generally not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally.