title: How do I align the decimal point when displaying doubles and floats
body: <p>If I have the following decimal point numbers:</p>
  
  <pre><code>Double[] numbers = new Double[] {1.1233, 12.4231414, 0.123, 123.3444, 1.1};
  for (Double number : numbers) {
      System.out.println(String.format("%4.3f", number));
  }
  </code></pre>
  
  <p>Then I get the following output:</p>
  
  <pre><code>1.123
  12.423
  0.123
  123.344
  1.100
  </code></pre>
  
  <p>What I want is:</p>
  
  <pre><code>   1.123
    12.423
     0.123
   123.344
     1.100
  </code></pre>