Skip to content

Instantly share code, notes, and snippets.

@rajeevprasanna
Created January 19, 2014 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajeevprasanna/8501200 to your computer and use it in GitHub Desktop.
Save rajeevprasanna/8501200 to your computer and use it in GitHub Desktop.
interface extending multiple interfaces
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
}
package interfaceExtension;
public interface Bounceable extends Moveable, Spherical {
void bounce();
void setBounceFactor(int bf);
}
package interfaceExtension;
public interface Moveable {
void moveIt();
}
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