Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: Counting Numbers instead of strings
|
Posted: Aug 7, 2003 2:33 PM
|
|
If a "user input" some string of numbers, then it is already a String, not a long. Therefore all you need to do is keep the first 8 characters of that string (and convert that to long, or not, as you wish). You may want to do other things like remove spaces, commas, etc., as well, by the way.
Maybe you could show a little of your code to demonstrate exactly what your problem is. If you do, please use the java tags explained in the gray Formatting Your Post box, while you are composing the post.
|
|