Hunter McMillen wrote:"Dog" + 345678 causes an error.
Actually that would work, if the right references are used. Remember that + is used for
string concatenations. However, in this case all references are Object references, and + definitely does not work for objects.
Vijay, print out the classes of the elements. Then find out if the numeric values have a common super class (they do, and it's not Object). If so, find a method that returns something you can add together (hint: it ends with "Value"). You can use the instanceof operator and casting to give you an instance of that common super class.