Created
November 29, 2016 17:36
-
-
Save daveRanjan/cebf6f26c7d51c0bd38f36eed009f356 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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