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