Thread Shutdown Hook Examples | 2022 | Java Part -67
YouTube Channel
– https://www.youtube.com/c/CodeWithNaval
Hi
I am Navalchand Rajupt . Welcome to our YouTube channel CodeWithNaval.
โค๐ง๐ข๐ฃ๐๐๐ฆ ๐๐ข๐ฉ๐๐ฅ๐๐
________________________________________________________________________
Java Shutdown Hook
Def:- ShutDown Hook Use for cleanup resources.
– if some code we want to execute before JVM ShutDown That code we can write inside ShutDown Hook Thread.
When JVM Shut Down?
– if we ย presses ctrl+c on the command prompt.
System.exit(0);
System Shut Down.
Execution complete.
Syntax:-
Runtimeย r=Runtime.getRuntime();ย ย
r.addShutdownHook(newย MyThread());ย ย
______________________________________________
๐๐
๐ข๐๐๐ข๐ช ๐ ๐ ๐ข๐ก ๐๐ก๐ฆ๐ง๐๐๐ฅ๐๐ :
https://www.instagram.com/codewithnaval/?hl=en
______________________________________________________
โค๐๐๐ฏ๐ ๐
๐ซ๐๐ ๐๐จ๐ฎ๐ซ๐ฌ๐ ๐๐ฅ๐ฅ ๐๐ข๐๐๐จ๐ฌ
1. ๐พ๐๐๐ ๐๐ ๐๐๐๐๐ ๐๐ ๐๐๐๐ ๐ฑ๐๐๐ ๐ช๐๐๐๐๐. :-
___________
โค๐๐๐ฌ๐ก๐ญ๐๐
#codewithnaval #java #javafreecourse #naval #programmingcourse #javaplaylist #javainstall
#javabycodewithnaval #javabycodewithnavalpart #javatutorial #corejavatutorial
______________________________________________________
____________________
โค๐๐๐๐ก๐ก๐๐ ๐ง๐๐๐ฆ
โบcodewithnaval
โบcodebynaval
โบcodder
โบnaval
____________________
โค๐๐๐ข๐จ๐ง
Please Subscribe & Press The Bell Icon To Get Updates On Upcoming Videos. Here You Will Learn Programming Language, Interview Preparation, Challenging Task and many more
____________________
โค๐๐จ๐ง๐ญ๐๐๐ญ ๐๐ฌ-
[email protected]
โค๐ง๐ต๐ฎ๐ป๐ธ๐ ๐๐ผ๐ฟ ๐ช๐ฎ๐๐ฐ๐ต๐ถ๐ป๐ด๐