Acara Selesai Program Java

Runtime.getRuntime().addShutdownHook(new Thread()
{
    @Override
    public void run()
    {
        //do your stuff
    }
});
JulesG10