my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Mock question for static method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Mock question for static method?" Watch "Mock question for static method?" New topic
Author

Mock question for static method?

Sam Sunamin
Ranch Hand

Joined: Mar 16, 2007
Posts: 113
What's the result of the following code?



The code above is compiled and run, but the suprised thing is that the result is
print - 0;

Can anyone explain? Thanks in advance.


Yours Sam<br />SCJP5.0 97%<br />SCBCD5.0 72%
Stuart Ash
Ranch Hand

Joined: Oct 07, 2005
Posts: 637
Didn't we discuss this before?

Am I getting a deja vu !!


ASCII silly question, Get a silly ANSI.
Sam Sunamin
Ranch Hand

Joined: Mar 16, 2007
Posts: 113
Can you post the link for me? I did not get the post?

Thank you.
Stuart Ash
Ranch Hand

Joined: Oct 07, 2005
Posts: 637
Voila - here it is!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock question for static method?
 
Similar Threads
initialization of static variables
simple prog.
Using a variable before it has been initialised
compile time constants
forward referencing