• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Override

 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, This is from ExamLab. I have given the question in the comments.
 
Prasad Kharkar
Ranch Hand
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever we are calling println method
then all the stuff that we are printing in it is calculated or executed first

see the code for explanation



Hope this helps
happy preparation
 
Stephen Davies
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Saibabaa,

Prasad has done an excellent job of outlining what happens, however I had to go through it myself in order to fully grasp what is going on and I have tried to simplify, or at least re structure the comments, and re-implement the code, with more verbose naming conventions, for my peace of mind, to try to follow the logic. If it may help I've posted my version here. Anyone feel free to correct me or comment if I have got it wrong. My comments try to show my understanding of whats going on.

 
Seema Kekre
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your awesome explanation Prasad. I still had to go through this step by step. I broke it down into 2 steps:

 
Anchit Herredia
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prasad Kharkar wrote:Whenever we are calling println method
then all the stuff that we are printing in it is calculated or executed first

see the code for explanation...
...
Hope this helps
happy preparation


Superb answer, Prasad! Well done!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic