Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tricky question

 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was reading the Java Language specification and I found this interesting code snippet about method overriding, hiding and overloading...

I did not read this in any book before:

What will be printed?



The output is:
Goodnight, Dick.

Does anyone knows why?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic