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 do we need data structure in java?
How would overload a function based on return type?
Is call by reference possible in java?
What is linkedlist in java?
Difference between current previous versions of Java?
can rmi and corba based applications interact ?
What is ascii format?
What is the difference between a field variable and a local variable?
What do you mean by local class?
What are the steps that are followed when two computers connect through tcp?
Are arrays static in java?
What is the difference between math floor and math round?
what is ststic with example
Can you declare an interface method static?
Describe how to implement singleton design pattern in struts.