title: Is it possible to put a thread to sleep, within itself?
body: <p>I am experimenting with Multithreading in java, basically I want to make two threads, and have them count to a number.</p>
  
  <p>But when they reach about half way they sleep for a set amount of time. So I was thinking to put an IF statement within the FOR loop to see when it reached halfway and then if it has, it will put itself to sleep.</p>
  
  <p>I am running a single core cpu atm because I am on a school computer so in theroy, when I put the first thread to sleep, the second one should start?</p>
  
  <p>Also, is it possible to put the first thread to sleep, from the second one and vice versa? </p>