- Joined
- Apr 25, 2012
- Messages
- 1
- Reaction score
- 0
Assume this is part of a method in a well-formed class. What's wrong with this snippet?
String age = JOptionPane.showMessageDialog("What is your age?");
int age = Integer.parseInt(age);
System.out.println("Age is: " + age);
String age = JOptionPane.showMessageDialog("What is your age?");
int age = Integer.parseInt(age);
System.out.println("Age is: " + age);