MinhHoang
10-11-2002, 05:10 PM
public static void doDouble()
{
double doublein;
String inputin=JOptionPane.showInputDialog("Please enter a double ");
doublein=Double.parseDouble(inputin);
JOptionPane.showMessageDialog(null, "value is " + doublein);
}
User entera double. The function should read the double into a local variable and print it to the screen with 2 places after decimal???
Lam sao lam cho no print out 2 places after decimal?
chi dum,
thanks
{
double doublein;
String inputin=JOptionPane.showInputDialog("Please enter a double ");
doublein=Double.parseDouble(inputin);
JOptionPane.showMessageDialog(null, "value is " + doublein);
}
User entera double. The function should read the double into a local variable and print it to the screen with 2 places after decimal???
Lam sao lam cho no print out 2 places after decimal?
chi dum,
thanks