can't call super from method but I need to??



See below, how can I call animals growl while within a method of my
interface (I need that - cant get rid of it).

public class animal {
public void growl() {
System.out.println("growl");
}
}

public class dog extends animal {


public void growl() {
IDefaultCall default = new IDefaultCall () {

public void execute() {
// I can do it this as super. points to IDefaultCell !
super.growl();
}
};
call (default);
}

}
.



Relevant Pages

  • Re: cant call super from method but I need to??
    ... public void growl() { ... public class dog extends animal { ... IDefaultCall default = new IDefaultCall { ...
    (comp.lang.java.programmer)
  • compile error problems
    ... public class Chicken: Animal ... public override void MakeANoise() ... public class SuperCow: Cow ... foreach (T animal in animals) ...
    (microsoft.public.dotnet.languages.csharp)
  • XML Serialize / Deserialize Abstract Types
    ... Now I want to serialize BarnYardStall to XML, ... may add new types of derived Animals such as Cat and Cow. ... public class Horse: Animal ... public Animal Occupant ...
    (microsoft.public.dotnet.framework)
  • Re: Generic inheritance
    ... public class Chicken: Animal ... The fact that the Animal class is abstract doesn't disqualify it from being used as T in the Farm class. ... If you create some Cow instances and some Chicken instances and put in the Farm, and then loop through the contents of the farm, you will get Animal references: ... In the Farmclass you can do anything to the animals that is defined in the Animal class. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Implementing an interface with qualified templates
    ... public class Fish: Animal ... public interface IZoowhere T: ... ListAnimals ...
    (microsoft.public.dotnet.languages.csharp)