1. Do I need to make this method synchronized? I believe so, because I am using StringTokenizer which I believe is not thread safe. Please share thoughts. 2. The Data class contains deprecated methods from String class. Can I use the methods that use 'default' encoding.
posted 15 years ago
1. So what that StringTokenizer is not synchronized? As long at is not a shared resource you are fine. Synchronization greately reduces performance and should only be used if absolutely required. Synchronizing StringTokenizer is not necessary/ 2. I believe that default encoding is fine.
I found a beautiful pie. And a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads