First of all, i could not find newThreadPool in Oracle docs, could you?

I have program like this :

Java Code:
	public static void main(String argv[]) throws InterruptedException
	{

		A[] arrayOfA = new A[]{new A(1),new A(2),new A(3),new A(4),new A(5)};
		
		ExecutorService executor = Executors.newFixedThreadPool(3);
		
		for(A Aelem : arrayOfA)
		{
			executor.invokeAll((Collection<? extends Callable<A>>) Arrays.asList(Executors.callable(Aelem)), 1, TimeUnit.SECONDS); // Timeout of 1 second
			Thread.sleep(1000);
		}
		
		executor.shutdown();
}
A class code :
Java Code:
public class A implements Runnable
{
	A otherThread = null; 
	Integer i = null;
	
	public A(Integer i)
	{
		this.i = i;
	}
	

	public void run()
	{
		while(true)
		{
			System.out.println(i);
		}
	}
I want my first thread start printing 1, then it must be terminated, then the second thread must start printing and so on.Threads with numbers 4 to 5 must not run at all.

But somehow all threads keep working despite of 1 second timeout. How can i solve this task?