my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Field Initializations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Field Initializations" Watch "Field Initializations" New topic

Field Initializations

Kali Praveen

Joined: May 27, 2004
Posts: 10
I was looking at the following example in JLS and couldn't think of why
there is no compilation error on lines 9,10,21,22 where as there is compilation error on line 18. I could get the reasons for other errors except for the errors/non-errors on those lines.

I agree. Here's the link:
subject: Field Initializations
Similar Threads
Restrictions on the use of Fields during Initialization
Forword Refferencing Question
Something weird in JLS (or in JBuilder)
strange code from Jls about initialization of fields