Look at the following piece of code:
     public void pinger()
     {
        ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(1);
        executor.scheduleAtFixedRate(runnable, start, rate, TimeUnit.SECONDS);
        executor.shutdown();
     }
Is there any use of writing the shutdown command in this case? Different clients would create their own runnable objects and invoke this function.
 
     
     
    