Gold Bond Ultimate Healing User Reviews & Ratings Gold Bond Ultimate Healing has an average rating of 4.1 out of 10 from a total of 14 reviews on Drugs.com. 36% of reviewers reported a positive experience, while 64% reported a negative experience. @Borat - "resource leak" implies that some system resource (usually memory) is being lost or wasted needlessly.

Understanding the Context

Usually this will impact you when you start getting OutOfMemoryErrors thrown during the normal operation of your program. In the above snippet, there is a resource leak, as if an IOException was thrown by write(), close() will never be called. Now my question is : What exactly is a resource leak? How can they cause harm to me?

Key Insights

If each java program is executed in it's own instance of the JVM, in an enclosed environment, how exactly can these "resource leaks" cause me harm? Is it possible for other malicious ... The warning continues to be emitted because you haven't guaranteed the resource will be closed in all cases, normal and exceptional. But you should ignore the warning in this case. Closing your scanner will close the underlying standard input stream as well, and it is rare to want to close standard input (if ever).

Final Thoughts

What is happening is that you are never closing your Scanner, so that resource might be getting "leaked". What this means is that the JVM is allocating, deallocating, and managing objects (resources) behind the scenes and needs to know if your Scanner object is still being used, or if it can free the memory (do "garbage collection") to use for something else. When the resource is closed, you ...