howdy.
above code works fine.
1. if we make above final variable static it is giving
compiler error saying "cannot assign value to a final variable"??
In my opinion,if an instance variable has been marked final,it has to be initialized at the same line.
or it has to be initialized at the end of every constructor of the class.(
till now am right i guess)
2. It is a compile-time error if a blank final class variable is not definitely assigned by a static initializer of the class in which it is declared.(
please explain this statement)
3. but here we have replaced constructor with static initialize block,this works fine,please give
reason for this also.
"is this mean that if a final instance variable has been made static also it has to be initialized in the static initializer block or on the same line."
does above line make sense?