employer cover photo
employer logo
employer logo

Advanced Global Solution

Is this your company?

Advanced Global Solution interview question

How do you manage multithreading in Java? Why are the issues that multithreading brings to applications?

Interview Answer

Anonymous

25 May 2019

you manage multithreading in multiple ways: using "synchronized" on methods and objects or by synchronizing on static classes for static variables; using more in deep "wait" and "notify"/"notifyAll" to manage also a threads wait set; using semaphores etc.. Multithreading is usefull for using the IDLE time of a CPU core (time for waiting some signal, like I/O), to fasten processing, to avoid collisions on a critical piece of code where a race condition occurs.