This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Static initaializer block & forward referencing -Question from SCJP 6 book by Khalid Mughal

 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question on static initializer block and forward referencing from khalid mughal scjp 6 book -page 411/ch 9 topic 9.9
It says in static initializer block too -follows declaration -before-use rule



As per this following example should fail .....One variable sf1 is declared ,defined and use in difference static blocks and not in order of declration-then define-then use.

 
Rob Spoor
Sheriff
Pie
Posts: 20533
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use code tags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic