Science, asked by Vipin556, 1 year ago

What is an object's lock and which object's have locks?

Answers

Answered by egssy
0
Object level lock vs Class level lock in Java. In Java, a synchronized block of code can only be executed by one thread at a time. Also, java supports multiple threads to be executed concurrently. This may cause two or more threads to access the same fields or objects at same time
Answered by sangamsurendras
0

Answer:

Object level lock vs Class level lock in Java. In Java, a synchronized block of code can only be executed by one thread at a time. Also, java supports multiple threads to be executed concurrently. This may cause two or more threads to access the same fields or objects at same time

Explanation:

Similar questions