Which of the following statements would store input in name?
A. name =
JOptionPane.showInputDialog("Enter your name and press OK");
B. name =
JOptionPane.showMessageDialog("Enter your name and press OK",
JOptionPane.PLAIN_MESSAGE, null);
C. name = System.in();
D. name = JOptionPane.input("Enter your name and press OK");
Answer: A
Computer Science & Information Technology