concurrency solutions in java

As we discussed that for shared resources visibility and access problems can occur in multithreading environment. Java provides thread synchronization and locks to handle these problems.

Synchronization solutions:

 

Locks solution:

Please Share