aspose file tools*
The moose likes Java in General and the fly likes Static initaializer block & forward referencing -Question from SCJP 6 book by Khalid Mughal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Static initaializer block & forward referencing -Question from SCJP 6 book by Khalid Mughal" Watch "Static initaializer block & forward referencing -Question from SCJP 6 book by Khalid Mughal" New topic
Author

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

Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
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

Joined: Oct 27, 2005
Posts: 19760
    
  20

Please use code tags.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Static initaializer block & forward referencing -Question from SCJP 6 book by Khalid Mughal