This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes argh.. method intiliazation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "argh.. method intiliazation?" Watch "argh.. method intiliazation?" New topic
Author

argh.. method intiliazation?

chafule razgul
Ranch Hand

Joined: Feb 09, 2002
Posts: 63

To my suprise it prints out
j=3
jj=4
3
Why does jj get initialized? i'm not sure where in the JLS i should look. Any help appreciated
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
there you go:
12.4.1 When Initialization Occurs


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
chafule razgul
Ranch Hand

Joined: Feb 09, 2002
Posts: 63
Thanks Valentin
Where can i get more practice questions on this particular aspect?
TIA!
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
I don't know but what you could do is write your own code or take that example and tweak it in all possible ways... It's a good exercise...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: argh.. method intiliazation?
 
Similar Threads
Interface Q
Question from Enthuware
Hurting My Brains
Interface question
Initialization Related Prob