Look at the
java.lang.Integer class for one parsing option. I'll reiterate my suggestion to check out Sun's
Java tutorials, get a reference book, or search the web: when I used Google to search for "java +convert string to number" I get a *lot* of relevant hits on the first page.
(And consider a code indentation style; it makes things much, much easier to read.)