File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parse double

 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

could anybody please tell wht this is doing
 
Roel De Nijs
Sheriff
Posts: 9158
76
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shanky,

Please carefully choose the forum before posting your question. This is the forum especially for SCJD certification. I will move your question to a more appropriate forum.

Kind regards,
Roel
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know where FloatingDecimal comes from, but it looks like it is converting a String (e.g. "2.34") into a double (2.34)
 
Rob Spoor
Sheriff
Pie
Posts: 20381
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:I don't know where FloatingDecimal comes from

This is taken from java.lang.Double. FloatingDecimal is sun.misc.FloatingDecimal.

Shanky, all you need to know is what the Javadoc of this method tells you:
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.

I won't quote the entire Javadoc of Double.valueOf; click on java.lang.Double and go to the valueOf(String) method.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm wary of using classes from sun.misc; it's proprietary and is not required to be in any implementation of a JDK/JRE.
 
Rob Spoor
Sheriff
Pie
Posts: 20381
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't use them either, but this is inside java.lang.Double.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh; I guess Sun's allowed to use it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic