import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;import java.util.concurrent.Semaphore; /** * Created by chengtao on 17/12/5. */public class Thread1401_Semaphore { public static void main(String[] args) { ExecutorServ…