package javacodebook.core.parsenumber;

import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.Locale;

/**
 * @author Mark Donnermeyer
 */
public class Starter {
    
    public static void main(String []args) throws Exception
    {
        String number = "1.000.000,50";
        String pattern = "###,###,###.##";
        try {
            DecimalFormat df = new DecimalFormat(pattern);
            System.out.println(df.parse(number));
        }
        catch (ParseException e) {
            System.err.println(e);
        }
    }
}
