198k views
3 votes
The datatype returned by the JOptionPane.showInputDialog method is

String.
int.
double.
specified by the user in the method call.

User Karn Kumar
by
7.8k points

1 Answer

2 votes

Answer:

String

Step-by-step explanation:

JOptionPane is a convenience swing class which displays different kinds of dialog boxes.Input dialog in particular represents prompts the user for some input. There are several polymorphic forms for this function with the most basic form being:

public static String showInputDialog(Object prompt)

As we can see the return type for this function is of type String which captures the value entered by the user on the dialog box.

User Tooschee
by
7.6k points