Hey there! This problem might be a bit unpredictable, but give it a go and let us know how you do!
Consider the following code snippet in Java. String str = new String("Hello");
SoftReference softStr = new SoftReference(str);
str = null;
System.gc();
str = softStr.get(); What type of references is used, and when is the garbage collector likely to reclaim the memory allocated for the str object?