// 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.util.*;
import java.text.*;

public class Num {
   private final static NumberFormat df1 = NumberFormat.getInstance(new Locale("da", "dk"));
   private final static NumberFormat df2 = new DecimalFormat("###,##0.00000", new DecimalFormatSymbols(new Locale("da", "dk")));
   public static void main(String[] args) {
      for(int i = 1; i <= 10; i++) {
         double x = 1.0 / i;
         System.out.println(df1.format(x) + " = " + df2.format(x));
      }
   }
}
