Misew

u/Misew



r/learnprogramming•

Example Incorrect code: http://pastebin.com/W6v9xC2Z

Correct code: http://pastebin.com/zTHvUiBK

The only difference in the code is at Line 55 where I call the instance variable directly instead of using the getter method in the incorrect version.

The calls to the superclass method from subclass method happens at lines 73 and 91.

Why does this happen? Shouldn't the fact that I use super make the call only to superclass method?

11

You've reached the end of this feed.