Object Storage
Using a string literal an object is created and “abc” is not in the string pool and therefore the object is created. One in the heap and the other within the “string constant pool” . The reference s Hand Made Writing will pointing to s at all times, and GC is not allowed in the…