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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by oops concept in java?

498


Where is the find and replace?

521


What is a functional interface?

537


What is the synonym of string?

527


Why is it important to initialize a variable?

484






What are the advantages of java over C++?

707


How do you do a line break in java?

485


Can you pass functions in java?

561


What does indexof return in java?

523


What is finally and finalize in java?

585


How transient variable is different from volatile variable?

548


What are predefined functions?

554


What is the protected method modifier?

557


What does a void function return?

539


What is data type in java?

481