Can someone show me a simple program that will display how to extend and use super?
ceyesuma -4 Posting Pro
Recommended Answers
Jump to PostSuper can also be used to call a parent class method that you overriding to extend the original functionality. i.e.
public void someMethod(){ // go ahead and do what parent class has defined super.someMethod(); // now do a few other things that this subclass needs... }
Jump to PostSo any child class of Super is going to begin with a height of 1 and width of 2.
You could then add things such as area, volume and other attributes from that base.Could you also change one of the original attributes? Say if I wanted to call Super, …
All 7 Replies
darkagn 315 Veteran Poster Featured Poster
ceyesuma -4 Posting Pro
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
no1zson 24 Posting Whiz in Training
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
no1zson commented: always helpful +1
ceyesuma -4 Posting Pro
no1zson 24 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.