Suppose you have the following code:
public class ReferenceTypesDemo {
public static void main(String[] args) {
Integer num = 1995;
SoftReference<Integer> softReference = new SoftReference<>(num);
}
}
Will the GC delete the num variable object if the application is close to running out of memory?