Console and JOptionPane input methods for String, Integer, Double, and
Long types