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.