3 ms·
But any class can inherit that Number, there is nothing enforcing that the subclass is particularly number-like. You can do just stuff like class MyString
by zokier 6y ago
But any class can inherit that Number, there is nothing enforcing that the subclass is particularly number-like. You can do just stuff like
class MyString extends Number
and you get access to operator overloads. Only thing that makes this annoying is Javas lack of multiple inheritance, but that is pretty minor thing.
- hinkley 6y agoThere is a level of stupid that is deniable, and a level that is not. MyString extends Number is going to lead more swiftly to words with your coworkers.