Java DecimalFormat problem <p>I would like to format numbers of type double with a German locale in Java. However something goes wrong since the output of the following code is : 0.0</p> <pre><code>package main; import java.text.DecimalFormat; import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; public class Test { private static String decimal2Format = "000.000"; public static void main(String args[]){ DecimalFormat format = (DecimalFormat)NumberFormat.getInstance(new Locale("de")); double value = 0; try { format.applyPattern(decimal2Format); value = format.parse("0.459").doubleValue(); } catch (ParseException e) { e.printStackTrace(); } System.out.println(value); } } </code></pre> <p>Do you have any ideas what is wrong or missing?</p> <p>Thanks, atticus</p>