DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    35

    how do you align currency output to files?

    my problem is this whenever i put a number in front of other numbers like so
    1. 22.33 65.78 45.57
    2. 55.78 24.78 65.19
    when i get to ten and then again 100 so on
    10. 55.78 58.78 45.25

    it pushes the decimal alignment off how can i fix this? I've tried using padding but that doesn't work I'm sure it is something simple but I can't seem to find anything on how to align things in a numbered way like that. Tab works in the java world but not in a text file becuase as you know they usually don't recognize tabs. Any help would be greatly appreciated.

  2. #2
    Join Date
    Mar 2006
    Posts
    35
    ok how about how do you right justify currency in java?

  3. #3
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    What can you find in the resources available to you about Java's resurrection of printf?

  4. #4
    Join Date
    Mar 2006
    Posts
    35
    never mind i see what the problem was I was looking at formatted currency as double when it is really a string thanks though.

Similar Threads

  1. Replies: 1
    Last Post: 04-24-2008, 06:03 AM
  2. Replies: 0
    Last Post: 11-28-2005, 12:56 PM
  3. XSL: output to several files
    By Jesper Tejlgaard in forum XML
    Replies: 1
    Last Post: 05-07-2002, 01:39 PM
  4. Currency Conversion
    By Simon Jones in forum Java
    Replies: 0
    Last Post: 10-17-2001, 05:44 AM
  5. Replies: 3
    Last Post: 06-12-2001, 11:05 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