File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure 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
  • 0
  • 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: 20388
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use code tags.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic