Ok, I'm pretty new to java, but I'm learning fast (hopefully). So, here is my problem:
I have a string (for example, we will use 2.9), I need to change this to int or long or something similar that I can use to compare with another number.
As far as I know, int doesn't support decimals, I'm not sure how long it does? If not, I need to know what decimal places support.
This is the error: java.lang.NumberFormatException: For input string: "2.9" with Interger.parseInt and Long.parseLong
Therefore any help would be appreciated!
source share