February 2014
Intermediate to advanced
160 pages
4h 59m
English
No one is useless in this world who lightens the burden of it to anyone else.
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 only using internal resources. However, GC is our responsibility if we use external resources, such as when we connect to databases, open files and sockets, or use native resources.
Java provides a few options to properly clean up resources, but, as we’ll see in this chapter, none are as effective as what we can do with lambda expressions. We’ll use lambda expressions to implement the execute around method (EAM) pattern, which gives us better control over sequencing of operations. ...