 Ideally, it will occur when a program is idle.It is guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new object; this can cause a program to stall momentarily.Explicit memory management is not possible in Java.