/** * HelloWorldApp displays the phrase "Hello, World." on standard output. * * @author jdalbey * @version 0.1 */ public class HelloWorldApp { /** * The entry point for the application * @param args not used */ public static void main(String[] args) { new HelloWorldApp().run(); } /** * Run the application, performing output to the console. */ public void run() { // Create a FriendlyPhrase for the target phrase FriendlyPhrase words = new FriendlyPhrase("Hello, World."); // Display the target phrase on standard output. System.out.println(words.phrase); } } /** * FriendlyPhrase represents a brief sentence of English text. * * @author jdalbey * @version 0.1 */ public final class FriendlyPhrase { /** The phase of text */ public final String phrase; /** * Constructor a FriendlyPhrase from the given string * @param aPhrase a brief sentence of English text. */ public FriendlyPhrase(String aPhrase) { // Save the phrase provided as a parameter this.phrase = aPhrase; } }