Different between parseInt() and valueOf() in java?

How is parseInt() different from valueOf() ?

They appear to do exactly the same thing to me (also goes for parseFloat(), parseDouble(), parseLong() etc, how are they different from Long.valueOf(string) ?

Also, which one of these is preferable and used more often by convention?

1Best Answer
11

Leave a Comment