Download source from src.zip
Console input
command line argument
JOptionPane
see also the JOptionPane example Addition.java