+ 6
Which keywords are used to achieve the constructor chaining in Java?
What type of keywords are used in constructor chaining
8 Answers
+ 9
Use extends keyword
+ 4
Did you mean using a constructor of a class in another class. Usually using extends keyword works well with it.
So a constructor defined in a class(A) can be used in the class(B) when instantiating it.
+ 4
No we used to calling extends constructor by using the keywords
Or keywords are used to creating chaining of same name constructor 's in class
+ 3
hunaysubhash chennu sorry i didn't get what you said.
+ 2
Super and this keywords
+ 1
Super and this
+ 1
To achieve Constructor chaining , super() method call is used whereas for local chaining this() method call.
Super() method call takes the control from child class constructor to parent class constructor.
This() method call takes the control to another constructor within the same class.
Hope this helps.