Re: can't call super from method but I need to??
- From: Daniel Pitts <newsgroup.spamfilter@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Dec 2007 15:32:57 -0800
caultonpos@xxxxxxxxx wrote:
See below, how can I call animals growl while within a method of myFirst, class names should be UpperCase.
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);
}
}
I think the syntax you're looking for is something like dog.super.growl();
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
.
- Follow-Ups:
- Re: can't call super from method but I need to??
- From: caultonpos@xxxxxxxxx
- Re: can't call super from method but I need to??
- References:
- can't call super from method but I need to??
- From: caultonpos@xxxxxxxxx
- can't call super from method but I need to??
- Prev by Date: Re: Use of AssertionError
- Next by Date: Re: NullPointerException, IllegalArgumentException, or AssertionError for null constructor argument
- Previous by thread: can't call super from method but I need to??
- Next by thread: Re: can't call super from method but I need to??
- Index(es):
Relevant Pages
|