public class Main { public void convertStringToInt() throws NumberFormatException { String s = "123"; int number = Integer.parseInt(s); }}