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
Does treeset use compareto?
Can we define static methods inside interface?
How do you escape json?
What are the 4 versions of java?
How many bits is a float?
What is method in java ?
Define the term string pool?
What is flag in java?
What are different types of control structures?
Can static method access instance variables ?
What is the r character?
What is a conditional statement explain with example?
How many bytes is a char in java?
What if constructor is protected in java?
What is the difference between a static and a non-static inner class in java programming?