When you override a method, you can still get the original method by using super.thatMethod(). You can only go back one level. In the constructor, if you use super(), it must be the very first code and you can not access any this. xxx variables or methods to compute its parameters. Those variables have been allocated, but not yet initialised. To help you remember which is the superclass, "Mom makes super pie" — the mother original class is the superclass. Note the way you use super() in constructors and super. in methods.
This page is posted |
http://mindprod.com/jgloss/super.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\super.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.15.141.151] |
| |
Feedback |
You are visitor number | |