July 2023
Intermediate to advanced
276 pages
6h 55m
English
We make extensive use of resources when programming—we access files, communicate to remote services, use database connections, and so on. And, that often involves working with issues like the timely release of the resources, locking for synchronization, and handling exceptions that may arise. Dealing with all of these concerns at the same time can get daunting. In this chapter we’ll see how we can structure our code, using lambda expressions, to alleviate the pain of managing resource access in general—that is, to deal with the mundane tasks that we’d better not get wrong.
We may have been led to believe that the JVM automates all garbage collection (GC). It’s true that we could let the JVM handle it if we’re ...
Read now
Unlock full access