Is there any point in closing resources such as sockets, files, and database connections if the JVM is going to shut down immediately afterwards? The OS isn't going to somehow keep sockets and database connections open, is it?
(I've written a simple TCP server-client application like the one in the official tutorial, but because I'm targeting Java 6 I can't use try-with-resources like the tutorial does. Also, not all APIs implement AutoCloseable
.)