Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Java commands (http://www.go4expert.com/forums/java-commands-t28510/)

Connie 3Jun2012 18:21

Java commands
Hi there ... my very first forum post :confused:Can some one please explain the difference between Double.parseDouble and Double.toString and when I might use either or both?

smohd 21Aug2012 16:40

Re: Java commands
As the functions names explain:
parseDouble passes a string as parameter and returns a double from it. For example if the string is "123" it returns a double 123. So simply take a numeric string and return it as double.

But toString returns a string from a double:
Oracle docs have the info for that: Double Class

All times are GMT +5.5. The time now is 14:25.