so the ExecutorService starts a new thread to top up the maximum of 5 threads again.
No, it keep the same 5 threads running until you shutdown the pool, even if those threads have nothing to do.
Is there a possible way of getting the new thread on that previously third position?
With a ThreadFactory you can create each thread as needed, e.g. to change the thread name, or make it a daemon. As I mentioned there isn't one created, so you won't be told.
Or in what order do threads get executed when the service has room for more threads.
The pool creates 5 threads before you have any jobs, and they keep running. There is no free slots as such.
I'd like to know this, because I want to implement some kind of 'thread table', in which you can see which Threads are running and which aren't (something similar to a task manager, but way less technical/advanced, just for a simple webcrawler).
I suggest using VisualVM. It shows you all the thread which are running/blocking/waiting etc. Giving your threads meaningful names is useful. ;)
[how to detect when it] "execute a new task".
You can sub-class the ThreadPoolExecutor. It has two methods
protected void beforeExecute(Thread t, Runnable r)
which will let you know when a thread is about to start a Runnable and
protected void afterExecute(Runnable r, Throwable t)
which is called when a task has finished.