Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 24212
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