Java language is operated on multithreading level
access. Synchronized wait, notify, and notifyAll
helping to protect against concurrently access
problems which occured when your logic is not sound.
It allows you to chose what thread to go first and so
on.
Sorry, you want elaborated and I just gave you a
summary. This one will take very long and occupy a
lot of bandwidth. Would you settle for a link?
java.sun.com/.../multithreaded.html