This section illustrates you how to convert a string into its integer equivalent. To demonstrate the conversion of string into an integer we are taking an example that take string as input and converts it into its integer equivalent value.
The given example takes a string as input and then
calls the parseInt() method of the Integer wrapper class to convert the string
into the its integer equivalent and receives that integer value into a Intval
variable and then displays that converted value on the console.
Here is the Output of the program:
Posted on: November 16, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles