Deadlocks occur when multiple threads are trying to access a method which modifies something say for eg.
class A{
int m
void meth(){m=m+5;}
}
Now if multiple threads access the method may lead to inconsistent values
1 thread reads,2 thread reads, 1 thread computes, 2 thread may get more CPU time and computes and make changes ,1 thread changes or overwrites its value.You probably know this I have the habbit of beating around the bush again n again
But in your case threads are not modifying something that all the threads need to modify at the same time
There's no problem with multiple threads accessing same object all the threads will get their work done eventually
The question is, is the static method convertDate returning this final result
string to a common place from where all threads again some how use it coz then you would need it to be synchronized or else you dont need your static function to be Synchronized
1 thread comes uses that indateFormat.parse() computes (local stuff) gives it to the outDateFormat.format() and it computes further(local stuff) and returns the value
Supposedly speaking some other thread comes during the execution of first thread (comes meaning gets CPU time).Also remember at a time only 1 thread runs dont be under the impression that all threads run simultaneously its just that these thredas context switch and time slice CPU time.
So 2 thread computes the final result and gives it out now the first thread again gets the CPU and finishes with the final result and gives it out, why doyou need a sync method let them time slice CPU time and compute the results making it sync doesnt allow other thread to use that method until 1 thread is done with it so it will take more time. The question is where does those final results go there's your answer.