Question #624

How to create a method that will be accessed by only one thread of execution at the same time?

Expert's answer

You have to mark this method with the keyword «synchronized». That will ensure that 2 or more processes will not use this method simultaneously.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS