Results 1 to 2 of 2

Thread: Java - How do I format the output of Array of Objects in Currency format?

Threaded View

  1. #2
    Frenzied Member
    Join Date
    Feb 2008
    Location
    Texas
    Posts
    1,288

    Re: Java - How do I format the output of Array of Objects in Currency format?

    You have to apply the currency DecimalFormat object to the string you want to be formatted...

    I can't remember exactly but it's something like:

    Code:
    DecimalFormat currency = new DecimalFormat("$#,###.00");
    
    for (int i = 0 ;i < count; ++i)
    			System.out.println(currency.Format(menu_items[i].toString()));
    		}
    Justin
    Last edited by MonkOFox; May 18th, 2010 at 10:51 AM.
    You down with OOP? Yeah you know me!
    MCAD and MCMICKEYMOUSE (vb.net)

    ----

    If it even kinda helps... rate it : )

    Edit a Multi-page .tif file and save.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width