Created
January 19, 2014 06:30
-
-
Save rajeevprasanna/8501200 to your computer and use it in GitHub Desktop.
interface extending multiple interfaces
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
package interfaceExtension; | |
public class Ball implements Bounceable { | |
public void bounce() { | |
} // Implement Bounceable's methods | |
public void setBounceFactor(int bf) { | |
} | |
public void moveIt() { | |
} // Implement Moveable's method | |
public void doSphericalThing() { | |
} // Implement Spherical | |
} |
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
package interfaceExtension; | |
public interface Bounceable extends Moveable, Spherical { | |
void bounce(); | |
void setBounceFactor(int bf); | |
} |
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
package interfaceExtension; | |
public interface Moveable { | |
void moveIt(); | |
} |
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
package interfaceExtension; | |
public interface Spherical { | |
void doSphericalThing(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment