What is the difference between this() and super()?
Answer Posted / gcttcs
Super should be used only in the sub classes and super() is
used to point methods of super class. where as this can be
used in both super & sub classes and this() used to point
methods in the class where it is called.
| Is This Answer Correct ? | 28 Yes | 6 No |
Post New Answer View All Answers
What is local class in java?
How do you detect memory leaks?
why using interface interface ?
Differentiate between a constructor and a method? Can we mark constructors final?
What is a arraylist in java?
Can we override constructors in java?
Difference between error and exception
What is the purpose of java?
What is independent and dependent variables in research?
What is the default execution method in java?
What are measurable parameters?
How does linkedlist work in java?
What is the difference between a method and a function in alice?
What types of index data structures can you have in java?
When the constructor of a class is invoked?