File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Tricky question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Tricky question" Watch "Tricky question" New topic

Tricky question

Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
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?
I agree. Here's the link:
subject: Tricky question
It's not a secret anymore!