Difference between this(), super()?

Answer Posted / shanthappa

"this" is the implicit keyword/object oriented by the jvm and supplied to every java programs for two purposes.
1) It points to current class object
2) It whenever formal parameters of the class are similar then jvm gets an ambiguity.
"super" is a keyword which will differentiate base class features with derived class features.
The keyword 'super' is placing an important role in three places in java...
1)at variable level
2)at constructor level
3)at method level

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static variable and global variable?

543


What are the different ways of creating thread?

568


What is the difference between overriding and overloading in OOPS.

553


What is immutable in java?

537


How do you compare arrays in java?

496






What is rule of accessibility in java?

540


Is string is a data type in java?

587


What is an array length?

496


What is indexof in java?

511


Can abstract class have private constructor?

494


What is replaceall in java?

541


How many bytes is 255 characters?

544


What does the string method compareto () do?

535


Is 0 true or false?

510


What is computer compiler?

526