// My first Java Program. // import statements are used to include libraries import java.io.*; // for input/output operations import java.util.Scanner; // for the general utility Scanner class class Hello{ // For now, a class is a container for a Java program. // Make sure the class name matches the filename public static void main ( String [] args) // execution starts here { Scanner entry = new Scanner(System.in); //A scanner reads from the console. String name = entry.next(); // The next thing typed in through the // keyboard will be stored in the String "name". System.out.println("Hello "+name); // The + operator joins 2 strings. // This prints Hello, followed by the text in "name". } }