Type-conversion Index Page 1
Converting String to Int in Java?
With Java, you can use the Integer.parseInt(). Here we will show you how to use parseInt to convert a String into an integer using Java. You can also use valueOf. Remember that when the string is not a valid integer it will be thrown NumberFormatException. check here for more details.