When I compile the following code:
class A{
final int i;
}
It generates compiler error: "variable i might not have been initialized"
but,In Brian's
SCJP book, it says:
The following code is legal, even though the final variable is not initialized within the same line on which it is declared:
public final int users; // Does not initialize a final variable
also,He said this several times in his book.
What's the truth? I think Brian made a mistake!
thanks!