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
What's the base class in java from which all classes are derived?
What is arraylist e?
Can constructor be synchronized?
What is a line break?
How to reverse a string in java?
What is a boolean used for?
'A class is a template for an object' explain this statement.
can any body body expalin best definitions & best real time exaples for opps concepts.
What is string pool in java?
Explain the importance of join() method in thread class?
Does java set allow duplicates?
What is the purpose of using break in each case of switch statement?
What are different types of constants?
In which language java is written?
What is string example?