Question: I want to convert some numbers which I got as strings into Doubles, but these numbers are not in US standard locale, but in a different one. How can I do that?

Answer: 
Just learning java and programming. Had similar question. Found something like this in my textbook:

```
Scanner sc = new Scanner(string);
double number = sc.nextDouble();

```

The book says that a scanner automatically decodes what's in a String variabel and that the Scanner class automatically adapts to the language of the set Locale, system Locale being the default, but that's easy to set to something else.

I solved my problem this way. Maybe this could work for the above issue instead of parsing?

Addition: The reason I liked this method was the fact that when using swing dialouge boxes for input and then trying to convert the string to double with parse I got a NumberFormatException. It turned out that parse exclusively uses US-number formatting while Scanner can handle all formats. Scanner made the input work flawlessly even with the comma (,) decimal separator. Since the most voted up answer uses parse I really don't see how it would solve this particular problem. You would have to input your numbers in US format and then convert them to your locale format. That's rather inconvenient when ones numeric keybord is fitted with a comma.

Now you're all free to shred me to pieces ;)
Do you know which locale it is? Then you can use

```
DecimalFormat format = DecimalFormat.getInstance(theLocale);
format.parse(yourString);

```

this will even work for scientific notations, strings with percentage signs or strings with currency symbols.