I'm new to Java and the site. First off, thanks for any input, I appreciate it.
So, for a homework assignment, I am asked to use dialog input and convert it to a double in one statement. I have been searching my text and the web for hours to no avail. Would someone so kindly direct me, PLEASE? I don't want the answer, just a direction, thanks!
double inputNum = Double.parseDouble(JOptionPane.showInputDialog(null, "Enter number"));
or for int:
int inputNum = Integer.parseInt(JOptionPane.showInputDialog(null, "Enter number"));
Often consulting the API can answer many questions.