
how do I use JOptionPane to accept keyboard input? I know how to import but not specific command on input line

import javax.swing.*;
class JOPtionPaneExample
{
public static void main(String[] args)
{
String name=JOptionPane.showInputDialog(null,"Enter your name:");
System.out.println("Hello "+name);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.