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:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: November 16, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles