Your preferences have been saved!
» Inheriting an inner class - class WithInner {   class Inner {   } } public class InheritInner extends WithInner.Inner {   //! InheritInner() {} // Won't compile   InheritInner(WithInner wi) {     wi.super();   }   public static void main(String[] args) {... 17 Feb 12 » Extending an interface with inheritance - interface Monster {   void menace(); } interface DangerousMonster extends Monster {   void destroy(); } interface Lethal {   void kill(); } class DragonZilla implements DangerousMonster {... 17 Feb 12 » Proper inheritance of an inner class - class Egg2 {   protected class Yolk {     public Yolk() {       System.out.println("Egg2.Yolk()");     }     public void f() {       System.out.println("Egg2.Yolk.f()");     }   }   private Yolk y = new Yolk();... 17 Feb 12 » Cleanup and inheritance - class Characteristic {   private String s;   Characteristic(String s) {     this.s = s;     System.out.println("Creating Characteristic " + s);   }   protected void dispose() {     System.out.println("finalizing Characteristic " + s);   } }... 17 Feb 12 » Composition for code reuse - class WaterSource {   private String s;   WaterSource() {     System.out.println("WaterSource()");     s = new String("Constructed");   }   public String toString() {     return s;   } }... 17 Feb 12 » Inheritance syntax and properties - class Cleanser {   private String s = new String("Cleanser");   public void append(String a) {     s += a;   }   public void dilute() {     append(" dilute()");   }   public void apply() {     append(" apply()");... 17 Feb 12 » Inheritance, constructors and arguments - class Game {   Game(int i) {     System.out.println("Game constructor");   } } class BoardGame extends Game {   BoardGame(int i) {     super(i);     System.out.println("BoardGame constructor");   }... 17 Feb 12 » Combining composition and inheritance - class Plate {   Plate(int i) {     System.out.println("Plate constructor");   } } class DinnerPlate extends Plate {   DinnerPlate(int i) {     super(i);     System.out.println("DinnerPlate constructor");   }... 17 Feb 12