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

What is more advisable to create a thread, by implementing a Runnable interface or by extending Thread class?

5 Answers  


how to accept integer array in java

2 Answers   Tech Guru,


whats string ?

10 Answers   HCL,


what is the difference between pagecontext and servletcontext?

5 Answers   TCS, JBA Infotech,


write a program to create an vector and listeterator.and value should be enter through keyboard.

1 Answers   Axcend,


What is the use of collections in java? How it is implemented in real time applications?

2 Answers  


what is webservices?

1 Answers   HCL, Ericsson, CTS,


What JNDI(Java Naming and Directory Interface) provides?

4 Answers  


What is the immediate superclass of Menu?

3 Answers  


Which characters are allowed to use as the second character of an identifier, and which characters are not allowed?

2 Answers  


Does garbage collection guarantee that a program will not run out of memory?

1 Answers  


What are the two major components of JDBC?

5 Answers   CMC, Mind Tree,




Categories