how to take user input in joption pane jav
import javax.swing.JOptionPane;
public class UserInput
{
public static void main (String[] args)
{
String userenters;
userenters= JOptionPane.showInputDialog ("What is your name?");
System.out.println("You entered" + userenters + ".");
}
}