I\'m attempting implement the add method mentioned in the Generic sparse matrix addition question
class Matrix { private T add(T left,
The compiler doesn't let you do this because T might be some other class, such as Double. You know that T is Integer from the instanceof check, but the compiler doesn't.
T
Double
Integer
instanceof