Consider what the Java Language Specification says about the additive +
operator
If the type of either operand of a + operator is String, then the operation is string concatenation.
Otherwise, the type of each of the operands of the + operator must be a type that is convertible (§5.1.8) to a primitive numeric type, or a compile-time error occurs.
Number
is not a type that is convertible to a primitive. You therefore cannot use the +
operator with variables of that type.
Consider using a different type or overloading your methods for each numeric type.