You're on the right track. Just like the Integer class has a method to parse a String into an int, the Long class has a method to parse a String into a long. A long is a primitive, not an object. You can use it just like you do an int, only it holds more. You might find
this Campfire story helpful.
A Long object is not the same as a long primitive. Substrings are only for use with String objects. A long number has the possibility of being larger than an int. Other than that, they're pretty much the same. An int is composed of 32 bits so it can hold a number that is 2 to the 31st power, and a long is composed of 64 bits so it can hold a number that is 2 to the 63rd power.
[ August 20, 2006: Message edited by: Marilyn de Queiroz ]