This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

argh.. i hate memory lapses. help with converting numbers to currency

 
Zhuge Liang
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mkay.. im tryin to convert a 'dollar amount' into a currency like output and i just cant remember for the life of me how to do it. help. kthx
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use "new java.text.DecimalFormat("#.##")" .
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And in case you don't have the memory of Ernest to remember so many details of the Java API, you might do well to remember the location of the J2SE API documentation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic