Search Interview Questions
| 3154 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|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.
Sample Code for this keyword
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve java this object reference constructor chaining intermediate   rare|
Try 3 Question(s) Test
|What is the default value of a declared object reference ?|
|Is it a bad practice to initialize object reference to Null ?|
|How different is it when final applied to variables and object references ?|
| In which memory segment - heap or stack, the following stored by JVM|
1. static members
3. object references
4. local or method variables