/* * HiUser.java * * Created on January 10, 2007, 12:26 PM * * Asks the user his/her name and gives a custom * greeting introduces the scanner class */ /** * * @author aharris */ import java.util.Scanner; public class HiUser { public static void main(String args[]){ Scanner input = new Scanner(System.in); System.out.println("What is your name?"); String userName = input.next(); System.out.println("Hi there, " + userName + "!"); } /** Creates a new instance of HiUser */ public HiUser() { } }