This code is part of a blog post.
The link to the blog post is given here. https://adityasridhar.com/posts/how-to-get-started-with-multithreading-in-java
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/basic-threads-demo.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.