Java Dialog Box Answer with two decimal points
<p>I am trying to write this so that the last dialog box answer in pounds is given with two decimal place holders. For example <code>23.56</code> or <code>245.32</code></p>

<p>For the life of me I can't get it.</p>

<p>Here is the code</p>

<pre><code>package weightconversion;

import javax.swing.JOptionPane;

public class Weightconversion {                                                                                                                                                                                                 
    public static void main(String[] args)                                                                                                         
    {
        double kilogram;
        String kilogramString;
        kilogramString =  JOptionPane.showInputDialog("Please enter your weight in kilograms: ");                                                                      
        kilogram = Double.parseDouble(kilogramString);                                                                                                                   
        double pound = 2.2*kilogram;
        JOptionPane.showMessageDialog(null,"Your weight in Pounds" + pound);
        String str;                                                                                                                                                                                                                                                                      
        str = String.format ("The value of Pound with two decimal "
            + "places = %.2f%n");
        System.exit(0);                                                                                              
    }
}
</code></pre>
