001/**
002 * This is part of HW0: Environment Setup and Java Introduction for CSE 331.
003 */
004package hw3;
005
006/**
007 * HelloWorld is an implementation of the token
008 * introductory "Hello World" program.
009 *
010 * HelloWorld is also the superclass for other classes in this package.
011 */
012public class HelloWorld {
013
014    /** the greeting to display when this getGreeting() is invoked */
015    public static final String GREETING = "Hello World!";
016
017    /**
018     * @effects prints the string "Hello World!" to the console
019     */
020    public static void main(String[] args) {
021        HelloWorld myFirstHW = new HelloWorld();
022        System.out.println(myFirstHW.getGreeting());
023    }
024
025    /**
026     @return Returns a greeting (in English).
027     */
028    public String getGreeting() {
029        return GREETING;
030    }
031
032}