Java api examples, how to use Threads and util.concurrent