View Single Post
  #2 (permalink)  
Old 12-13-2007, 12:38 PM
staykovmarin staykovmarin is offline
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
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.
Reply With Quote