// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
import java.util.Locale;

public class DecimalParse {
    private final static NumberFormat df = new DecimalFormat("###,##0.00000", new DecimalFormatSymbols(new Locale("da", "dk")));
    public static void main(String[] args) throws Exception {
        System.out.println(df.parse("29.930,00"));
        System.out.println(df.parse("29.930,01"));
        System.out.println(df.parse("29.930"));
        System.out.println(df.parse("0,01"));
    }
}
