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 Answers
+ 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