Understanding Strong and Weak References in Java
Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. For example: Object obj = new Object(); If the program faces memory shortages, rather than collecting...