How is Garbage collection done in Java?
Answer Posted / boomiraj
Programmer can not cause the garbage collector.
We can call the garbage collection using System.gc();
And we can set the variable value equal to null, it assign that variable garbage rest the that use.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Is math an abstract class in java?
Can two objects have same hashcode?
What is arraylist class in java?
Define an applet in java?
Are the imports checked for validity at compile time? Will the code containing an import such as java.lang.abcd compile?
How do you define a set in java?
Explain differences between collection api and stream api?
How do you create a reference in java?
Can an interface extend another interface?
How many digits can a float hold?
How is treeset implemented in java?
What is string pool in java?
Is string is a data type?
What is java lang object?
What is final, finally, finalize?