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

how many ways we can serialize the java object?

2 Answers   Satyam,


byte a=5; byte b=5; byte c=a+b; System.out.println(c); whats the o/p?

7 Answers   NIIT, Wipro,


I have 2 objects inside one object(vector). how can i serialize one of them. I dont want to serialize the second one

3 Answers   ABC, L&T,


My application URL : http://localhost:8080/Application/Login.jsp. When a user enter this url in IE then, how it get Login.JSP Page exactly? what are the processes will happen from when we submit the URL to get Login.jsp?

3 Answers   IBM, TCS,


what do you meant by Platform-Independent?

6 Answers   Persistent,






In a my eclipse editor if i want to switch from jdk 1.4 to jdk 1.6 how to do that???? Initially i have jdk1.4

1 Answers   Tech Mahindra,


What is the difference between Object and Instance?

5 Answers   TCS,


How to provide security in java

0 Answers   Tech Mahindra, Infosys, TCS,


Why does java doesnot support multiple inheritance?

5 Answers   TCS,


define System.out.println(); what is the meaning!

19 Answers   Accenture,


Difference between Choice and a List?

1 Answers  


where the static methods will live ,on stack ? can you explain brefly

1 Answers  






Categories