How are this() and super() used with constructors?

How are this() and super() used with constructors?

Hi,

How are this() and super() used with constructors?

thanks,

View Answers

April 18, 2013 at 10:47 AM

Hi friend,

In any programming language keywords are the reserve words which contains the specific meaning relevant to the corresponding programming language's compiler. Likewise, this and super keywords in Java programming language are reserved for specific purposes. this keyword helps in removing the ambiguity of references and allows to refer to the current instance within the running program. super keyword is used for calling the parent's class constructor i.e. we can established constructor chaining using this keyword.

For more detail please go through the following links

http://www.roseindia.net/help/java/s/super-java-keyword.shtml

http://www.roseindia.net/help/java/s/super-keyword.shtml

http://www.roseindia.net/help/java/t/this-java-keyword.shtml

http://www.roseindia.net/java/beginners/useofthisoperator.shtml









Related Tutorials/Questions & Answers:

Ads