I know there have been questions which are similar to mine. However, they seem very outdated (assuming JDK 7, etc.) So, I've been programming python for a while and had to learn Java for university. I know that there is a feature in Python, where you can use a pool of Threads/Processes for mapping a list of values to a function.
from multiprocessing.dummy import Pool as ThreadPool
pool = ThreadPool(4)
results = pool.map(my_function, my_array)
I have to use the function on a large set of files and I have to use Java (10) and I want to use multiprocessing. My question is: Does Java have such a feature? If so, whats the best practice to use it properly?