In this chapter, we talked about multithreaded processing, the ways to organize it and avoid unpredictable results caused by the concurrent modification of the shared resource. We have shown readers how to create threads and execute them using pools of threads. We have also demonstrated how the results can be extracted from the threads that have completed successfully and discussed the difference between parallel and concurrent processing.
In the next chapter, we will provide readers with a deeper understanding of JVM, its structure and processes, and we'll discuss in detail the garbage collection process that keeps memory from being overflown. By the end of the chapter, the readers will know what constitutes Java application execution, Java processes inside JVM, garbage collection, and how JVM works in general.