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
What is collection sort in java?
Is static a singleton?
What does %4d mean in java?
What are design patterns and please explain?
What are the important features of Java 9 release?
How do you decide when to use arraylist and linkedlist?
What is string in java with example?
What is an example of a conditional statement?
What is string and its types?
Is a string literal?
What are the different types of java?
Is vector synchronized in java?
What is a double?
What are the advantages of inner classes?
What are new features introduced with java 8 ?