Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
if a method is synchronized then how it is different from other method?
1 ответ
0
synchronized methods are used with multithreading. They prevent the method from being ran when other synchronized methods of the same object block are being ran.
https://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html