This code is part of a blog post.
The link to the blog post is given here.
Read the blog post to make the best use of this repo :)
Clone this code to your local using the following command
git clone https://github.com/aditya-sridhar/java-threads-synchronized-example.git
Or you can import the project into an IDE of your choice. I Used Eclipse to test this out
Each Code in this Repo has a main() function. So each code can be run independently.