To turn a string into an integer:

Integer.parseInt(yourString);

All other primitive data types have similar methods.