public class Greeter extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
Constructor and Description |
---|
Greeter(java.lang.String aName)
Constructs a Greeter object that can greet a person or
entity.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
sayHello()
Greet with a "Hello" message.
|
private java.lang.String name
public Greeter(java.lang.String aName)
aName
- the name of the person or entity who should
be addressed in the greetings.public java.lang.String sayHello()