{{theTime}}

Search This Blog

Total Pageviews

Java Shutdown Hook

Runtime.getRuntime().addShutdownHook(new Thread(() -> {
            System.out.println("Shutdown started");
             //  Close all the resource locks
            System.out.println("Shutdown successful");
        }));

No comments:

BlockingQueue Applications

Java BlockingQueue is a versatile data structure that can be used in various real-time scenarios where multiple threads need to communicate ...