What keywords is used to access the method or member variables from - ProProfs Discuss
Advertisement

What keywords is used to access the method or member variables from the superclass in object oriented programming?

Asked by Coulter, Last updated: Apr 06, 2024

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

i.Elizabeth

i.Elizabeth

i.Elizabeth
I.Elizabeth

Answered Feb 02, 2018

Special keywords are required to access certain members. In case the method you use happens to override the superclass’s method, you can always abort the overridden method by the strategic use of keywords. These keywords are called keywords super. Moreover, the keyword super is also used to access hidden fields.

However, accessing hidden fields is often discouraged. With the super class are special subclasses with specific names. In order to override the command you need to incorporate the keyword super in the right context to allow override of the right class to get the needed result. Hence, the keyword super can be used to access the different variables from the super class.

upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Jan 15, 2017

Super
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.