Mega Code Archive
Categories
/
Java Tutorial
/
Data Type
Declaring Checked Exceptions
public class Main { public void convertStringToInt() throws NumberFormatException { String s = "123"; int number = Integer.parseInt(s); } }