A question about GC
- by chun
This is a quesiton taken from a java exam,
How many objects are eligible for gabage collection at #1 ?
public class Main {
Integer x = 32768;
public static void main(String[] args)
{
Main m = new Main();
m = null;
// #1
}
}
I thought it just collect Integer x, does GC even collect the Main object m?