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 is the purpose of default constructor?
Can a class be declared as static?
Why main method is static in java?
What are void pointers?
Explain enumeration in java?
What is lifetime variable?
Explain the importance of throws keyword in java?
Explain importance of throws keyword in java?
What is the null?
How to create packages in java?
How do we access static members in java?
Explain parallel processing in java8?
How is java hashmap implemented?
What is a classloader in java?
Write a program to find the greatest of three numbers in java?