static methods, way to clear heap?
is there a way to clear the java heap for static methods, for example.
I create a class called arrayUtils, that I create a pile of static methods in for quick use for arrays (sort, add, delete, etc).
the only problem with this is that if I use this method once, I cannot use it again because the second time round the values params and temp are the same so it does not work, being that static methods persist, calling on it a second time round does nothing. So is there anyway to clear them? or is it just best to not use them in cases such as this? Ideally what I would want is to create a static template method class/classes such as this.
public static myArray addElement(myArray e)
myArray temp = new myArray[e.length];
for (int i=0;i<e.length;i++)