Waiting for multiple threads to finish

Description: We need to perform four jobs , out of which three jobs are mutually exclusive and should be performed simultaneously(may be getting data from the database using select query)  and the outcome of three jobs will be served as the input for the fourth job.Hence, the fourth job could not be started untill the first three jobs are completed.   Java package com.example; ...