aspose file tools*
The moose likes Beginning Java and the fly likes parse double Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "parse double " Watch "parse double " New topic
Author

parse double

Shanky Sohar
Ranch Hand

Joined: Mar 17, 2010
Posts: 1051


could anybody please tell wht this is doing


SCJP6.0,My blog Ranchers from Delhi
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5398
    
  13

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


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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)


[My Blog]
All roads lead to JavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Oct 27, 2005
Posts: 19718
    
  20

I don't use them either, but this is inside java.lang.Double.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Oh; I guess Sun's allowed to use it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: parse double