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
What is the basic difference between string and stringbuffer object?
What is the difference between the font and fontmetrics classes in java programming?
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; }
What is the difference between member variables initialization and assignment in a constructor?
Is it possible for a yielded thread to get chance for its execution again?
What is this () in java?
What is oop in java?
What is the relationship difference the canvas class and the graphics class?
What is default locale java?
What is java algorithm?
What does indexof mean?
What are the parts of a method?
Why parameters should be passed by reference?
What is the concatenation operator in java?
Explain about doubly linked list