InYou need to be aware of all the examples that you describe, usingspecial cases where it is compulsory to use thissuper
andor superthis
is purely a matter of preference. You seem to be awaredescribed one of the specialthose corner cases like- overridden functions, etc. so I'll concentrateYou will learn more special cases as you go on the "standard" case. There
Other than those specific cases, using this
and super
is no advantage or disadvantage in termsa matter of actual functionalitypreference. They produce the same machine code, and so they are exactly the same as far as the machine is concerned. However, they differ in terms of their readability to a person.
However, itIt is important to pick one style and use it consistently. By this, I mean not just you, but your entire team. Everyone decides on one way of doing things and sticks to it. This makes it easy to understand the team's code. This is called a "coding standard".
Check if there are any published coding guidelines or coding standards set by the company or the team. If yes, just follow them. Otherwise, see what the rest of the team normally uses. You may want to discuss this with your team to officially decide on a standard.