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



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

Answer / 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

More Core Java Interview Questions

Difference between error and exception

3 Answers   Nous, TCS,


Suppose there is a System A which gives some output. This output is used as input by system B. The rate at which System A produces is faster than the rate at which system B consumes it. How can you improve this?

1 Answers   RBS,


Is JRE required to compile Java files ?

4 Answers   HCL,


In which order the iterator iterates over collection?

0 Answers  


Difference between Array and vector?

9 Answers  


How do you initialize an arraylist in java?

0 Answers  


There are three interfaces A,B & C. A extends B, B extends C, and C extends A.Is it multiple Inheritance? please anybody help me.....

5 Answers  


Explain the different forms of polymorphism?

0 Answers  


Write a program to print 15 random numbers using foreach of java 8?

0 Answers  


Why do we need variables?

0 Answers  


How to instantiate member inner class?

0 Answers  


How many types of classes are there in java?

0 Answers  


Categories