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
Assume a thread has lock on it, calling sleep() method on that thread will release the lock?
Why do we need data serialization?
What is linkedlist in java?
What does indexof return in java?
Explain the public class modifier?
What is null statement?
When do we use hashset over treeset?
What are white spaces in java?
What is meant by object?
How is treeset implemented in java?
Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)
Is ++ operator is thread safe in java?
Why string is called as immutable?
Is a method a function?
What is the static import?