What is the difference between the new Double (someString) and Double.parseDouble (someString)

As far as I can tell, new Double(someString) and Double.parseDouble(someString) give me the same result. Is there any reason why I would like to use one over the other?

+6
source share
1 answer

One returns Double ; another, Double .

The differences between Java primitive types and their wrapping counterparts are discussed, for example, here .

+11
source

Source: https://habr.com/ru/post/906863/


All Articles