Can you tell me why java don't have a destructor class like C# ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Can you tell me why java don't have a destructor class like C# ?

9th Sep 2016, 10:18 PM
Sandile Mtshali
Sandile Mtshali - avatar
2 Réponses
+ 5
Java has garbage collection. Objects are automatically destroyed when not needed anymore.
9th Sep 2016, 10:23 PM
Zen
Zen - avatar
0
it has garbage collection and we use finalize instead of destructor
11th Sep 2016, 5:16 PM
Dheeraj Reddy
Dheeraj Reddy - avatar