Computer Applications

How can you convert a numeric value enclosed in a string format ?

Java String Handling

3 Likes

Answer

We can convert a numeric value enclosed in a string format into a numeric value by using valueOf() method.

For example, the given statement will return the numeric value of the String argument "15".

int num = Integer.valueOf("15");

Answered By

3 Likes


Related Questions