Page 1 of 1
About Question enthuware.ocpjp.v8.2.1761 :
Posted: Sat Jul 23, 2016 7:08 am
by badbishop
There is nothing in the main method that could possibly call run() method of Merger with any answer. A Merger instance is just constructed, but never used. Or am I missing something?
Re: About Question enthuware.ocpjp.v8.2.1761 :
Posted: Wed Aug 17, 2016 1:47 pm
by godfatherofpolka
Actually, the Merger instance is passed to the CyclicBarrier as the barrierAction (a Runnable "which will execute the given barrier action when the barrier is tripped, performed by the last thread entering the barrier", see
https://docs.oracle.com/javase/8/docs/a ... .Runnable- ).