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 the driver class?
Is null a keyword in java?
Explain access modifiers in java.
What are assembly attributes?
what do you mean by classloader in java?
What is Java Annotations?
What are the differences between graph and tree?
Which method must be implemented by all threads?
What does += mean in java?
What is the largest data type in java?
What are java packages? What's the significance of packages?
What is args length in java?
Explain about method local inner classes or local inner classes in java?
Which one of the following suits the description of a string better: derived or primitive?
What is the difference between declaration and definition in java?