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

waht happens when a return type ,even void is specified for a constructor?

11 Answers  


what is connection pooling with example?

3 Answers   Amdocs,


write a progam hashmap & hashtable?

2 Answers   IBM,


what is object slice?

0 Answers  


If set accepts only one argument then how can it compare two objects to avoid duplicates

5 Answers  






Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target

7 Answers   Infosys, WW,


What is OOP?

2 Answers   BMC, Microsoft,


Explain the differences between public, private, protected and static?

4 Answers  


explain the concept of virtual method invocation in polymorphism in detail?

0 Answers   TCS,


How applets will communicate with each other?

1 Answers  


i need to know the website that i can compile and run a java code in online.(while system doesn't contain any jdk and jre)

0 Answers  


what is mean by method signature?

7 Answers   Satyam,






Categories