Hi

I just started to learn Java and when i was reading through the tutorial for building a simple GUI.
It says that parseDouble method is not localizable. I don't understand what it is refering to as this method is not localizable. Please explain to me.THANKS!!!!!!!!!!!! :D

Code

int tempFahr = (int)((Double.parseDouble(tempTextField.getText()))
            * 1.8 + 32);
    fahrenheitLabel.setText(tempFahr + " Fahrenheit");

I think it means that the text it is parsing has to be in standard 8-bit ascii or utf-8 format. IE, if your locale (or the user's) is set to Chinese or such (unicode - 2 bytes / character instead of 1), then it cannot parse the text as a number.

Probably refers to the different ways that numbers are typed, thousands separator, decimal point etc eg US 12,34.56 in France would be 12.345,56, and I think some countries leave a blank as the thousands separator

thanks alot!!!!! :D

If that answers your question then pleasse mark this thread "solved" for our knowledge base.
Thanks
J

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.