+ 3

Is there a destructor in JAVA ? +10x

How can i write a class destructor in Java (or get the same efect) ? i would like to file.close() and say "good bye" at the end of my application. THANK YOU :-)

31st May 2019, 1:20 PM
🍂B. Eitan 🌵
🍂B. Eitan 🌵 - avatar
5 odpowiedzi
+ 3
Nope because it's garbage collected https://stackoverflow.com/a/171957/11059514
31st May 2019, 4:12 PM
HNNX 🐿
HNNX 🐿 - avatar
+ 4
Shukriya Anhjje 😁
31st May 2019, 5:02 PM
🍂B. Eitan 🌵
🍂B. Eitan 🌵 - avatar
+ 4
~ swim ~ Thank you. we love pink floyd ~ swim ~
31st May 2019, 8:33 PM
🍂B. Eitan 🌵
🍂B. Eitan 🌵 - avatar