Here is a tutorial that uses Threads in Java for a console application in Terminal bash session on a Mac laptop.
This program sets off 2 sets of 4 threads in two modes of operation, first using the freedom of Threading ideas and the latter (orderly = true) for Threads that run to their completion before another starts.
Good background reading for this tutorial would be:
- Threading in computing
- Java concurrency
- Good explanation of relationship of join() to start() and run() for Java Threads here
Link to Java programming source code which you should rename to JavaThreadTutorial.java
If this was interesting you may be interested in this too.