Skip to content

Instantly share code, notes, and snippets.

@daveRanjan
Created November 29, 2016 17:36
Show Gist options
  • Save daveRanjan/cebf6f26c7d51c0bd38f36eed009f356 to your computer and use it in GitHub Desktop.
Save daveRanjan/cebf6f26c7d51c0bd38f36eed009f356 to your computer and use it in GitHub Desktop.
public class Notify implements SmsSender, EmailSender {
@Override
public class send(){
//Todo: try to send something
// What if now I only want to use default send() method from SmsSender
// You can call the default method of SmsSender using super keyword
SmsSender.super.send();
//similarly you can call send method from EmailSender
EmailSender.super.send();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment