Illegal argument exception

I have caut the illegal argument exception, when the string is parsed
into a integer, this could do the trick.