Java Garbage Collection
Java’s Garbage Collector is one of the key features in the Java environment. When you develop in Java, the objects you instantiate are allocated in the heap of the Java Virtual Machine. In Java you don’t have to think about how to allocate and deallocate objects in memory. For an object that is no longer used, the Garbage Collector finds them by deduction. Most people think GarbageCollector finds unused objects in the heap space memory and removes them, in fact it’s the active objects that are tracked, everything else is marked for garbage collection....