I got this point that , final variable must have a value ( must initialize ) before completing constructor . So this class have a default constructor like this :
So compiler will check , if this constructor initializing all the final variables or not ... so thatswhy in this case compiler giving error because compiler is not initialising final variable j .
You can also use a static initializer to initialize a static blank final.
It is clear because static blocks are execute at the time of class loading , so final variable will have a value before completing constructor .
However, that will not create a "constant expression that can be evaluated at compile time" for use in a case label.
please any body can explain me this line . why so ?
thanks a lot .
[ January 14, 2005: Message edited by: rathi ji ]