This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
In java, we can change any data type to string by adding with a string. if i have the String int i=0; String str=""+i;
now the value of i is 10 and the value of str also i. we can perform mathematical operation on i and not str eventhouth str is an integer. so we have to convert the str to an integer format. for that int x=Integer.parseInt(str); then the x contains integer variable.
The solution is from the string having the integer value, we can get integer using the parseInt funtion.