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

You might also like to view...

The ____ loop can be used to process each element of an array.

A. For Element B. For Array C. For Each D. For Value

Computer Science & Information Technology

How is prototyping similar to firing artillery?

What will be an ideal response?

Computer Science & Information Technology