previous |
start |
next .... [Slide 37] ....
Reading Input
- Use input dialog:
String input = JOptionPane.showInputDialog("How old are
you?");
- If user cancels, result is null:
if (input != null) age = Integer.parseInt(input);
![.](images/Ch1_11.jpg)
previous |
start |
next .... [Slide 37] ....