Write a program that reads in the users name eg Bob and then
Write a program that reads in the user\'s name (e.g. \"Bob\") and then prints out \"HI\" and then their name (e.g. \"Hi Bob!\"). (Note: This assignment should use JOptionPane to do input and output).
Solution
import javax.swing.JOptionPane;
public class HelloWorld {
public static void main(String[] args)
{
String ss;
ss=JOptionPane.showInputDialog(\"enter your name\");
JOptionPane.showMessageDialog(null, \"HI\"+\" \"+ss+\"!\");
System.exit(0);
}
}
