What Is a Shutdown Hook in Java and How Can You Use It Effectively?Shutdown hooks enable resource management cleanup during JVM shutdown.