The parseInt() method returns an int, not an object from the Integer class. This method only works if the String consists solely of numbers and no characters. If that ...
Some minor feedback on the jdk annotations: java.lang.Integer#parseInt should probably accept nullable strings, since it guards against null input and throws a NumberFormatException. Requiring that ...