Solved

formating numbers

Posted on 2002-03-20
1
188 Views
Last Modified: 2010-03-31
(1)   i want to format numbers with 3 decimal places..
        DecimalFormat fmt=new DecimalFormat("0.###"); /// it's not giving anything.. the answer was with no         decimals at all..however when i calculated it.. it should give that..!!?!?!

(2)  and how to add the currency type of my country infront of the money like to say  AED 100.00
        AED is like $ and so on..

plz waiting.. for the 2 questions...
0
Comment
Question by:saroosh
1 Comment
 
LVL 9

Accepted Solution

by:
Venci75 earned 30 total points
ID: 6882169
try this:
java.text.DecimalFormat df = new java.text.DecimalFormat("AED  #,000.000");
System.out.println(df.format(1123223.5));
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 21
firstswap challenge 20 67
java jdbc batch example 8 21
Way to decrease size of apk file 9 42
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now