import javax.swing.JOptionPane;
public class GUI {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("Enter your Name");
JOptionPane.showMessageDialog(null, "Hello"+name);
int age = Integer.parseInt(JOptionPane.showInputDialog("Ente r your age"));
JOptionPane.showMessageDialog(null, "You are "+age+" years old");
double height = Integer.parseInt(JOptionPane.showInputDialog("Ente r you height"));
JOptionPane.showMessageDialog(null, "You are "+height+" cm tall");
}
}
- I'm new to this please help
Exception in thread "main" java.lang.NumberFormatException: For input string: ""