Why destructor is not used in java?



Why destructor is not used in java?..

Answer / Ankush Soni

Java does not support destructors because it provides automatic garbage collection to manage memory, eliminating the need for destructors.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How do you compare two strings? any predefined method for this?

3 Answers  


How listener identify that the event came from a particular object?

1 Answers  


What is length in java?

1 Answers  


What is sortedmap interface?

1 Answers  


When do you create an index?

0 Answers  


What is default locale java?

1 Answers  


What are peerless components?

1 Answers  


What is regex used for?

1 Answers  


What is a pattern what is an anti pattern?

1 Answers  


Tell us something about an iterator.

1 Answers  


what is abstract method with example?

6 Answers   Infosys, Virtusa,


what are the methods in object?

1 Answers   IBS,


Categories