+ 3
what is a destructor ? can it be overload ?
this related to Java and c++ language - what's the answer of this question
2 Respostas
+ 3
A destructor is opposite of constructor. It is used to empty or delete the memory occupied my variables. Its main use is to prevent memory wastage. And destructor cannot be overloaded.
+ 1
In Java there are no destructors, because you do not handle memory yourself. Cleanup is done by the garbage collector.