Java - Interview Questions and Answers on Constructor Chaining

Q1.  What are the common uses of "this" keyword in java ?

Ans. "this" keyword is a reference to the current object and can be used for following -

1. Passing itself to another method.
2. Referring to the instance variable when local variable has the same name.
3. Calling another constructor in constructor chaining.

Q2.  Can we call constructor explicitly ?

Ans. Yes.

Q3.  What is constructor chaining and how is it achieved in Java?

Ans. A child object constructor always first needs to construct its parent. In Java it is done via an implicit call to the no-args constructor as the first statement