Greeter.Mood
Supported greeting moods.
Values
FRIENDLYFORMALJAVA · JAVADOC
Real Javadoc HTML output from the checked-in java fixture source. Generated artifacts, commands, versions, and SHA-256 hashes are recorded under sources/native. This is a teaching library, not a published SDK.
Supported greeting moods.
FRIENDLYFORMALA professional tone.
Greeter.MoodA relaxed tone.
Greeter.MoodGreeting prefix used for future calls.
StringGreet a reader.
nameStringStringA friendly greeting. new Greeter().greet("Ada");
Reject an empty reader name.
IllegalArgumentExceptionIllegalArgumentException - When name is empty.
nameStringStringA validated greeting.
Greet several readers in order. new Greeter().greetMany(new String[]{"Ada", "Linus"});
namesString[]String[]Greetings in the same order.
Legacy greeting alias.
Deprecated. Use greet(String) .
nameStringStringA greeting.
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
IllegalArgumentExceptionIllegalArgumentException - if this enum class has no constant with the specified name
nameStringGreeter.Moodthe enum constant with the specified name
Returns an array containing the constants of this enum class, in the order they are declared.
Greeter.Mood[]an array containing the constants of this enum class, in the order they are declared
Build personalized greetings without network access. Greeter greeter = new Greeter(); System.out.println(greeter.greet("Docsy"));