Number formatting

Hi,
   What's the best way to format a number for currency? The value 1.80 for example would be stored in a float as 1.8  

   What's the best way to do this? :)


Thanks,

Pete

LVL 1
petepalmerAsked:
Who is Participating?
 
expertmbCommented:
0
 
Al-KhwarizmiCommented:
NumberFormat.getCurrencyInstance().format ( myNumber );
0
 
expertmbCommented:
Al-Khwarizmi,
the link has same piece of code :)
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
Al-KhwarizmiCommented:
I know, but I didn't see your comment when I posted mine, as I took a while to test the code. :/
Isn't there any way to delete comments?
0
 
expertmbCommented:
>>I know, but I didn't see your comment when I posted mine, as I took a while to test the code. :/
it happens. it happened many times to me also. no problem :-)

>>Isn't there any way to delete comments?
venabili might help in this regards.

0
 
petepalmerAuthor Commented:
Only fair that you both win. One gave me some examples, the other took the time to test it - so I doubled the points and halved them between you :)

Cheers for your help!
0
 
expertmbCommented:
:-)
cheers to ALL !!!

mb...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.