I'm still a student and i started learning the java programming language newly,I just wanted to ask about how to convert an argument in the function main from a string to a double,just like converting a string to an integer with Integer.pasreInt(arg)
Asked
Active
Viewed 347 times
-6
-
2Given you know how to convert a `String` to an `int`, I might be worth expanding that knowledge by taking a punt and looking at the JavaDoc for `Double` - http://docs.oracle.com/javase/6/docs/api/java/lang/Double.html – Nick Holt Dec 18 '13 at 09:15
-
Don't be scared to make mistakes, no harm in taking a shot in the dark and exchanging the types in that statement, pass a Double arg and crossing your fingers. – ChiefTwoPencils Dec 18 '13 at 09:27
1 Answers
3
-
3
-
Please mates, if it's a duplicate, and it sounds to be one, flag it instead of replying (even if you one is really good :)). – Jean-Rémy Revy Dec 18 '13 at 09:17
-
Probably not, in this case the answer was easier than finding the duplicates though :) Having said that he should have been able to find this easily himself so a nudge in that direction would be in order... – Tim B Dec 18 '13 at 09:17
-
1