Morphis
Apprentice

- Joined
- Aug 2, 2008
- Sythe Gold
- 0
- Messages
- 734
Well I am trying to convert a string to an int. The string grabs numbers from a website, and then i convert the string to an int that I can use to do calculations. My question is this, how can I convert a string with a comma to an int. I am getting an error when the number exceeds 3 digits and the website adds a comma.
For example the website has a number - 1,487
The string grabs that all good and it will return 1,487 but when i do
I get an error because of the damn comma.
Any help is greatly appreciated.
For example the website has a number - 1,487
The string grabs that all good and it will return 1,487 but when i do
Code:
int x = Integer.parseInt(string);
Any help is greatly appreciated.

