Java Generics in Java Generics in Java A Common Problem

Korsons Don
Korsons Don
3,141 Points

Why was the variable 'contents' dereferenced?

Why was the variable 'contents' dereferenced inside the else block of the remove method? wouldn't it better to do away with the extra line of code and just return the contents? i.e. Object thing = contents; return thing;