How to send a request to garbage collector?

Answer Posted / uv

As far as I know,it is not required to call the garbage
collector.
It automatically and periodically removes the unused
objects by an algorithm known as "Mark and Sweep".

However, if we intentionally want to call it then the above
suggestions are perfect.
Anyone who feels that it is incorrect, please feel free to
correct me.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the basic difference between string and stringbuffer object?

573


What is the difference between the font and fontmetrics classes in java programming?

490


public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }

1841


What is the difference between member variables initialization and assignment in a constructor?

652


Is it possible for a yielded thread to get chance for its execution again?

504






What is this () in java?

569


What is oop in java?

517


What is the relationship difference the canvas class and the graphics class?

554


What is default locale java?

528


What is java algorithm?

516


What does indexof mean?

524


What are the parts of a method?

531


Why parameters should be passed by reference?

490


What is the concatenation operator in java?

568


Explain about doubly linked list

610