Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| |||||||||||
Core Java - Interview Questions and Answers for 'Constructor chaining' - 3 question(s) found - Order By Newest | |||||||||||
| |||||||||||
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. | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() ![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() 1. static members 2. objects 3. object references 4. local or method variables | |||||||||||
| |||||||||||
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 | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() ![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
| |||||||||||
Ans. Yes. | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
| |||||||||||