ti parserizzi la stringa come intero:
Integer.parseInt(stringa);