Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners How are this() and super() used with constructors?

Have Programming Question? Ask it here!
 
 
 


Java Coder
How are this() and super() used with constructors?
1 Answer(s)      a year ago
Posted in : Java Beginners


Hi,

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

thanks,


Advertisement
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:
 

 

 

DMCA.com