import rebelsky.io.SimpleInput; import rebelsky.io.SimpleOutput; /** * A simple Java program that illustrates textual input and output. * * @author Samuel A. Rebelsky * @version 1.0 of January 1998 */ public class Welcome { /** * Prompt for the user's name and print a greeting. */ public static void main(String[] args) { // The object we're using to read input. SimpleInput in; // The object we're using to print output. SimpleOutput out; // The user's name. String name; // Set up input and output. in = new SimpleInput(); out = new SimpleOutput(); // Prompt for the name. out.print("What is your name? "); // Get the name. name = in.readLine(); // Print a friendly message. out.println("Hello " + name + ", welcome to the joy of Java."); // That's it System.exit(0); } // main } // Welcome