A Code Example
public static void main(String [] args) {
NiceFellow fabian = new NiceFellow("Fabian");
fabian.addShadow(new SmileShadow());
fabian.call("printMood");
Equivalent to fabian.smile(1);
The “smile” message is sent to fabian.
- Creation of a new Nice Fellow object.