String myString = "1234" int foo = Integer.parseInt(myString);

Read more of this post