wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes How to convert exponential value to decimal form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to convert exponential value to decimal form" Watch "How to convert exponential value to decimal form" New topic
Author

How to convert exponential value to decimal form

Bakul Ghude
Greenhorn

Joined: Nov 28, 2006
Posts: 7
I got stuck while converting exponential value to decimal value .
Please suggest code for this
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11153
    
  16

could you explain in more detail what the problem is? do you not know what exponential form means? Do you have a string? a Double? a double? are you trying to convert it for use within your program, or just for display?

there are too many unknowns to give any meaningful answer.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Bakul Ghude
Greenhorn

Joined: Nov 28, 2006
Posts: 7
Actually It is double
but if the no is like 1,00,00,000 then it will convert it into exponential form so i do not want this exponential form i want normal no
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Have a look at the class java.text.DecimalFormat. It allows you to format numbers any way you like.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to convert exponential value to decimal form
 
Similar Threads
Thinking in Java excercise
Help Regarding Decimal Format Class
assignment 2.2
How to convert exponential value to decimal form
Trouble with BigDecimal and Double