Difference between this(), super()?
Answer Posted / nikhlesh gupta
this() call one of user define constructor inside another user constructor of the same class such as this(a), this(a,b) & so on.
super() call one of base class constructor inside the derive class constructor such as super(a), super(a,b) & so on.
| Is This Answer Correct ? | 26 Yes | 5 No |
Post New Answer View All Answers
What differences exist between iterator and listiterator?
What is the gregoriancalendar class in java programming?
How to overcome the exception object reference not set to an instance of object?
What is the difference between an array and an array list?
What is the purpose of the finalize() method?
Why is serialization required?
How can we make copy of a java object?
What is the difference between state-based unit testing and interaction-based unit testing?
What is the function of static in java?
Does constructor return any value?
How to split arraylist elements in java?
How many types of voids are there?
What is a instance variable?
How are variables stored in memory?
What are 3 boolean operators?