Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

why are there no destructors in java?

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.
 
PREVIOUS NEXT
Tagged: #destructors
ADD COMMENT
Topic
Name
1+4 =