C and C++ has constructors and distructors, why does Java
does not have distructors?

Answer Posted / sandesh magdum

Because java has automatic garbage collection feature and java
does not let you illegally or accidentally release memory
occupied by an object.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is difference betweem home interface and remote interface?

2111


What does += mean in java?

572


What is flush () in java?

556


Is void a type?

583


When the constructor of a class is invoked?

591






What is Gang of four design patterns

594


What is constant in programming?

554


Explain the access modifiers for a class, method and variables?

657


What is singleton class in ruby?

563


Can you declare the main method as final?

525


What is the private method modifier?

577


Explain different types of wrapper classes in java?

597


Can we call virtual funciton in a constructor ?

1776


What are JVM.JRE, J2EE, JNI?

691


What do you mean by byte code?

507