What is my understanding is when initialising the static int i it invokes peek() method, at that time it finds a variable j which has to be returned, but it is not defined yet, so it temporarily creates a variable j and initialises it to 0 and returns it. Only where it is not explicitly initialised it is initialised to the default values, not in all the cases.
Originally posted by Axel Janssen:
The initial question of Farhan remains open.
What does happen, when the class is initialized with the class member access (Z.i)???
I don�t have any idea. Even if I put a second System.out.println(Z.i) the value remains zero.
If I use final modifier for Z.i it gives 100.
Any ideas???
AM<BR> <A HREF="mailto:[email protected]" rel="nofollow">[email protected]</A>
Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Hey guys!! come and have some cups of HOT JAVA........<BR>Adeesh