kri shan wrote: Whether Java.util.concurrent.CountDownLatch is the replacement of synchronized block ?
No. The CountDownLatch class is not a replacement for the synchronize block. It is simply an implementation of a tool, that makes it easier to implement a common use case -- ie. the ability to release a group of threads when the threads in the group reach an agreed upon point.
If you are looking for a replacement for the synchronized block, then the ReentrantLock class is probably the best implementation for that.
Henry