public class test5{
C c=null;
public test5(){
System.out.println("+10");
C c1=new C();
c=new C();
}
public static void main(String[] args){
test5 a = new test5();
System.gc();
new C();
a = null;
System.gc();
}
}
class C{
static int count=0;
String name=null;
public C(){
name="2"+(++count);
System.out.println("+"+name);
}
protected void finalize() {
System.out.print("-"+name);
}
}
Cosa e perchè dovrebbe sputare?
io vedo un +10 +21 +??? qui sarebbe 22 ma sulla carta faccio 21 come prima..