How do i make a double number(eg value 5) to be display as
5.00 on the screen?
Thanks
Printable View
How do i make a double number(eg value 5) to be display as
5.00 on the screen?
Thanks
Code:double num = 3.1416
DecimalFormat df = new DecimalFormat("0.00");
String a = df.format(num);
http://www.java2s.com/ExampleCode/De...tocurrency.htm
a complete demo
http://saloon.javaranch.com/cgi-bin/...&f=33&t=015587
---------------
Naveen Vooka
www.devsquare.com
DevSquare - Online Application Development