Skip to content

Instantly share code, notes, and snippets.

@ellehallal
Created June 12, 2019 14:16
Show Gist options
  • Save ellehallal/b04b1d83021a5b1a8bace6d111f35054 to your computer and use it in GitHub Desktop.
Save ellehallal/b04b1d83021a5b1a8bace6d111f35054 to your computer and use it in GitHub Desktop.
public abstract class Greeter {
public final void greeting() {
waveHello();
doHello();
celebrate();
waveGoodbye();
doGoodbye();
}
public void waveHello() {
System.out.println("🙌");
}
public abstract void doHello();
public void celebrate() {}
public void waveGoodbye() {
System.out.println("👋️");
}
public abstract void doGoodbye();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment