1 /* 2 * Variant of Hello World, that features a widget 3 */ 4 package greetings; 5 6 import javax.swing.JOptionPane; 7 8 public class HelloYou { 9 public static void main(String[] args) { 10 String name = JOptionPane.showInputDialog(null, "Who are you?"); 11 System.out.println("Hello, " + name + "!"); 12 } 13 } 14