Difference between this(), super()?
Answer Posted / priyanka das
"super" is a keyword used to invoke superclass data members and also superclass member methods,whereas "this" is a keyword used to invoke the current class data member as well as current class member methods.
A super object can be used to retrieve super class members."this' object can be used to invoke only the current class members.
Again super() can be used to invoke the superclass constructor where as this() can be used to invoke current class constructor.
| Is This Answer Correct ? | 23 Yes | 0 No |
Post New Answer View All Answers
why using interface interface ?
What is main difference between variable and constant?
How many decimal places is a double?
Is java se open source?
Is .net better than java?
What is a condition in programming?
Define inheritance?
What is super keyword explain with example?
What is an example of procedure?
How is hashcode calculated in java?
What is locale?
Is ++ operator is thread safe in java?
What are exceptions
What is the basic of java?
How many wrapper classes are there in java?