Please ignore post, I have no idea what I am talking about.
Is your code actually creating any threads? I know that when the jvm runs it does it in a multithreaded fashion, but does your code expectly create any threads? Because if it doesn't than you don't need to worry about "synchronization".
As a side note why would you define a method as static? Defining a method as static means you only want one copy of that method. So evey piece of code which calls that method is using the same code. Sharing the variables if I am not mistaken. "static" is not good OO.
I created the convenience methods in some classes in my utility package as static so that they could be easily accessed in JSP's by calling classname.methodName() without having to instantiate the class.
Please ignore post, I have no idea what I am talking about.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
But if the code references anything outside the method you are immediately at risk.
Originally posted by verduka fox:
The date formats are static SimpleDateFormats defined in this class that are then used in the appropriate static methods.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Does synchronization become an issue with different instances of the same class
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Don't get me started about those stupid light bulbs. |