Execute a list of Threads in parallel
You should make i a parameter of executeQuery :

private String[] listScript = {"Script1", "Script2", "Script3", "Script4"};

private void executeQueries() throws InterruptedException {

    ExecutorService threadPool = Executors.newFixedThreadPool(listScript.length);
    // submit jobs to be executing by the pool
    for (int i = 0; i &lt; listScript.length; i++) {
        final int j = i;
        threadPool.submit(() -&gt; executeQuery(j));
    }
    // once you've submitted your last job to the service it should be shut down
    threadPool.shutdown();
    // wait for the threads to finish if necessary
    threadPool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS);

}

private void executeQuery(final int index) {
    System.out.println(listScript[index]);
}


I used lambda here as it's simply less verbose. j is needed as i must be final for the closure to work ;)

Also awaitTermination(Long.MAX_VALUE... isn't a very good idea.... It's over 10 millions years you know ? ^^