is it possible to execute same function concurrently from thread. I have doubt that in java method area is same so the multiple call to same function may lead to waiting state , am i correct?
is it possible to execute same function concurrently from thread. I have doubt that
Share
yes, it is possible unless you have used synchronization there wont be any waiting for lock. This is the default behavior, no locking and thread execution can be interleaved.
Though remember that your thread scheduler will allow one thread to run at a given time.
By default in absence of synchronization concurrent access without wait is the behavior.
Sample to demostrate