DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4

Thread: decimal place

Hybrid View

  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, 07: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, 12:45 AM
  3. Conversion of decimal in Oracle to Access 2000
    By Villy Olsson in forum Database
    Replies: 4
    Last Post: 04-06-2002, 08:01 PM
  4. Packed Decimal Help
    By Larry Goldstein in forum VB Classic
    Replies: 0
    Last Post: 06-27-2001, 10:47 AM
  5. Textbox for Decimal Number
    By Dante in forum VB Classic
    Replies: 2
    Last Post: 06-23-2000, 02:45 AM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links