What is the use of Synchronized keyword?



What is the use of Synchronized keyword?..

Answer / Deepak Kumar Singh

The Synchronized keyword in Java is used to ensure that only one thread can access a method or a block of code at a given time, preventing multiple threads from accessing and modifying shared resources simultaneously, which could lead to inconsistencies or errors.n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Operating Systems General Concepts Interview Questions

Which is better internet explorer or edge?

1 Answers  


Give an example of a Process State.

1 Answers  


Differentiate between Complier and Interpreter?

2 Answers   TCS,


What is Dirty bit? What is the role/purpose of dirty bit?

1 Answers  


What is a virtual memory?

1 Answers  


Why use 64bit excel?

1 Answers  


How does disk operating system work?

1 Answers  


What is a binary semaphore? What is its use?

7 Answers   CDC, Maveric, Morgan Stanley,


What is operating system in computer?

1 Answers  


What is a long term scheduler & short term schedulers?

1 Answers  


Is 4gb ram enough for netflix?

1 Answers  


What is the operating system?

1 Answers  


Categories