Using a generic class to perform basic arithmetic operations

No, there isn’t a way to do this, or else it would be built into Java. The type system isn’t strong enough to express this sort of thing.

Leave a Comment