How to Add 2 Numbers ?
How to add 2 numbers(integers,floats,..etc. In JAVA language
Collapse
X
-
Tags: None
-
Originally posted by Ganon11...with the '+' operator?
abstract superclass of many classes that implement the 'add' operator but one
has to use the 'instanceof' operator or deal with 'ClassCastExcep tions' in order
to just add two Numbers. Don't blame me, I didn' invent that language ;-)
Of course for primitives Java behaves like a full blown programming language and
that '+' operator is implemented for convenience.
kind regards,
JosComment
-
I simply assumed that, since every other word in the OPs question was capitalized, that his/her question was "How to add 2 numbers," not necessarily referring to any specific class or type, but instead referring to ints, doubles, floats, etc. etc.Comment
-
Comment