Created
November 6, 2018 09:40
-
-
Save ufocoder/adfaf5f4587659cb6ccaf53f4892f906 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| interface InjectWheels { | |
| public void setWheels(Wheels w); | |
| } | |
| interface InjectBattery { | |
| public void setBattery(Battery b); | |
| } | |
| class Car implements InjectWheels, InjectBattery { | |
| Wheels injectedWheels; | |
| Battery injectedBattery; | |
| public void setWheels(Wheels w) { | |
| this.injectedWheels = w; | |
| } | |
| public void setBattery(Battery b) { | |
| this.injectedBattery = b; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment