// 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 DoubleFormat {
   public static void main(String[] args) {
      DecimalFormat df = new DecimalFormat("######.00");
      System.out.println(df.format(1.1));
      System.out.println(df.format(22.22));
      System.out.println(df.format(333.333));
   }
}
