Any points to clarify my confusion would be greatly appreciated.
This is an interesting question that is often asked at exams ;-)
The first thing to notice is that 'super' references the receiver but
changes the way the method it looked up, therefor
self = super
is always true. Furthermore
Hi Dennis,
I don't think I've seen you on this list so welcome! I think your question
is a very good one. I read the other responses you received and they are
very good. I thought I'd give you a practical example of what is called a
factory pattern to explain why this is so important and how
Hi dennis
two points:
- aClass new returns an instance of that class
- super represents the receiver of the message but the lookup of the
method in the superclass
of the class that contains the super call. Once the method is found
it is applied to the original receiver.
So now
Monster