BTW, you can click on the "Discuss" link at the bottom of the question display screen to go to the discussion on that particular question directly. This might help you see the answer to your doubt immediately
Sukhitha sunil wrote:in answer output of b.getH() printbefore b.h .how can this possible?
This code snippet (and its output) is already explained in great detail in this topic. So I'm pretty sure when you have carefully read this excellent topic you'll have a perfect understanding why this output is printed. If you still have doubts and/or questions, just let us know by replying to this topic.