decimal place


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: decimal place

  1. #1
    Join Date
    Aug 2005
    Posts
    10

    decimal place

    How do i make a double number(eg value 5) to be display as

    5.00 on the screen?

    Thanks

  2. #2
    Join Date
    Mar 2004
    Posts
    635
    Code:
    double num = 3.1416
    DecimalFormat df = new DecimalFormat("0.00");
    
    String a = df.format(num);

  3. #3
    Join Date
    Sep 2005
    Posts
    5

  4. #4
    Join Date
    Aug 2005
    Posts
    23
    http://saloon.javaranch.com/cgi-bin/...&f=33&t=015587

    ---------------
    Naveen Vooka
    www.devsquare.com
    DevSquare - Online Application Development

Similar Threads

  1. Replies: 2
    Last Post: 09-27-2006, 08:29 PM
  2. how come 0 wont appear at end of decimal place
    By racerrunner in forum Java
    Replies: 2
    Last Post: 09-21-2005, 01:45 AM
  3. Conversion of decimal in Oracle to Access 2000
    By Villy Olsson in forum Database
    Replies: 4
    Last Post: 04-06-2002, 09:01 PM
  4. Packed Decimal Help
    By Larry Goldstein in forum VB Classic
    Replies: 0
    Last Post: 06-27-2001, 11:47 AM
  5. Textbox for Decimal Number
    By Dante in forum VB Classic
    Replies: 2
    Last Post: 06-23-2000, 03:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center