Pardon me if this is a noob answer....

But have you tried using parseInt?

i.e:
String HI = whatever it equals
int hi = Integer.parseInt(HI);