Numeric Input
Converting a string that holds an integer into the integer value can be done with a method in the Integer wrapper class:
value = Integer.parseInt (my_string);
A value can be read and converted in one line:
num = Integer.parseInt (stdin.readLine());
See Addition.java and Addition2.java