how to convert string to int and catch in java code example Example: java convert String to int int i = Integer.parseInt(myString);