Because Java is a garbage collected language you cannot predict when (or even if) an object will be destroyed. Hence there is no direct equivalent of a destructor.
There is an inherited method called
finalize, but this is called entirely at the discretion of the garbage collector. So for classes that need to explicitly tidy up, the convention is to define a closemethod and use finalize only for sanity checking (i.e. if close has not been called do it now and log an error).Credit: https://stackoverflow.com/questions/171952/is-there-a-destructor-for-java |
-- How to create an awesome Powerpoint slide -- :D :D Hope to watch it and like it :D :D https://youtu.be/slpriQkGT-k How to create an awesome Powerpoint slide in powerpoint 2013 . This video is for making a quickest awesome . Its easy to create a this amazing powerpoint template . To subscribe : https://www.youtube.com/channel/UCzgm... To Watch more videos : https://www.youtube.com/channel/UCzgm... Put your comment about this video on Comment box :) Hope to like this video and share this video . This will inspire me to make more video . THANK YOU! #Shortcuts : Duplicate : Ctrl+D Increase Shape horizontally : shift+ Right_arrow Increase Shape vertically : shift+ Up_arrow Shapes group create : Ctrl+G(First select shapes then press ctrl+ G) #softwares: Using : Powerpoint2013 Video Edit : Camtasia8 Add music: Camtasia8 #MUSIC : Song: Rival [Top Shelf Sounds Release] Artists: Onhar Music provided by Top Shelf Sounds...
Comments
Post a Comment