You may convert a String to an int, provided the String contains number only.
The following example will work in cases where an int number is contained in the string called thisString:
String thisString = "100";
int x;
x = Integer.parseInt(thisString);