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 */
012@SuppressWarnings("nullness")
013public class HelloWorld {
014
015    /** the greeting to display when this getGreeting() is invoked */
016    public static final String GREETING = "Hello World!";
017
018    /**
019     * @effects prints the string "Hello World!" to the console
020     */
021    public static void main(String[] args) {
022        HelloWorld myFirstHW = new HelloWorld();
023        System.out.println(myFirstHW.getGreeting());
024    }
025
026    /**
027     @return Returns a greeting (in English).
028     */
029    public String getGreeting() {
030        return GREETING;
031    }
032
033}