To convert a String string into an int type, you need to use the parseInt () method or the valueOf () method in the Integer class for conversion! Note: In the process of conversion, if there are non-numeric characters in the input string, it cannot be converted and an exception needs to be thrown.