Solve “unchecked warning” in Java avoiding @suppressWarnings
问题 This is a Trying to improve my code question. About generics and the unchecked warning; I do know about the @suppresswarnings annotation. The question is what am I suppose to code to suppress it . Take, please, the following code. public class NumericBox<T extends Number> implements Box<T> { private T element; public NumericBox(T element) { this.element = element; } @Override public T getElement() { return element; } public T insert(Number newElement) { T oldElement = this.element; this