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
What are instance variables?
Is node a data type in java?
How many types of java are there?
Explain when we should make an instance variable private.
Explain the public class modifier?
What is treeset in java?
What is the purpose of extern variable?
If two threads have same priority which thread will be executed first ?
we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
What are the advantages and disadvantages of reference counting in garbage collection?
What is the syntax and characteristics of a lambda expression?
What occurs when an object is constructed?
What are computer functions?
Can we convert integer to string in java?
What is final variable?