|
There is only one class that can undergo arithmetic operation, and that is the String class. It can only add two Strings together, which is called concatenation , when you add them together. The Inter class just allows for certain operations that PRIMITIVES cannot do:
Integer a, b;
assuming they have been assigned values:
a + b will NOT work
On the other hand
int a, b;
a + b WILL work because int is a primitive
I suggest that you use the Integer, Double, Float, and so on classes, only when you need some of the methods they provide.
|