RejectedExecutionException in Java Threads
<p>I am writing a multithreaded program in java. I have written something like this</p>

<pre><code>exec.execute(p)  // where p is a runnable task working on an array
print array
exec.shutdown
</code></pre>

<p>The problem I am facing is that the array gets printed giving the correct output but then the rejected Execution Exception comes
I don't understand why when the threads have processed and given the correct output why is the error coming...</p>
