Java tutorial
//package com.java2s; import java.util.Locale; public class Main { public static String buildIdentificationNumberWithDecimalSeparator(CharSequence number) { if (number.length() == 0) { return number.toString(); } try { Long value = Long.valueOf(number.toString()); Locale.setDefault(Locale.GERMAN); return String.format("%,d", value); } catch (NumberFormatException e) { return ""; } } }