Java Concurrency How to do a task repeatedly using threads in java / How to create a timer using ScheduledThreadPoolExecutor in java Suppose we want to do a task after fixed time interval such as creating a beep sound…