This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes No 'E' in a big floating point number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "No Watch "No New topic
Author

No 'E' in a big floating point number

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hello world,
Could you please tell me how to get rid of the 'E' which appears when a big valued floating point number in a text field. Say 1.03E7 like that.
Thanks


SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Wayne L Johnson
Ranch Hand

Joined: Sep 03, 2003
Posts: 399
Take a look at the java.text.DecimalFormat class. You can specify a format, which might include commas or decimal points or parenthesis (for negative number), and number of digits after the decimal point.
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Thank you very much for the reply.
I would take a look at it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: No 'E' in a big floating point number