title: Synchronizing three steps in three different threads?
body: <p>In my main programme, i start three threads as described below</p>
  
  <p>Thread 1:- having steps 1A and 1B</p>
  
  <p>Thread 2:- having steps 2A and 2B</p>
  
  <p>Thread 3:- having steps 3A and 3B</p>
  
  <p>I want Thread 1, 2  and 3 proceed for their next step only when all of them complete their first step. </p>
  
  <p>For example:- Thread 2 and Thread 3 have completed their first steps i.e 2A and 3A respectively but Thread1 did not
  complete step 1A. So thread 2 and 3 will wait till thread 1 complete step 1A</p>
  
  <p>I know i can handle it with simple static counter and only proceed once counter value is 3. But i am sure there must be
  something off the shelve available in thread/java.util.concurrent package?</p>