// 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.*;

public class DFormat {
   public static void main(String[] args) {
      DecimalFormat df = new DecimalFormat("#.00");
      for(int i = 0; i < 5; i++) {
         String s = df.format(Math.exp(i));
         s = "          ".substring(s.length()) + s;
         System.out.println(s);
      }
   }
}
