Hi Ushma,
Your statements are correct. Final instance variables must be
definitely assigned by the end of every constructor of their class, so you can't have constructors that don't assign to the variables. Also, only constructors and initializer blocks can assign values to final instance variables. The exact set of rules are a bit complex, based on
Java's precise definition of "definite assignment"; see the
JLS for more details if you're interested.
Some other subtleties to note: a constructor can call another constructor to do the assignment, like this:
And the assignment can also be done in an initializer block, like this:
However, you cannot assign more than once to a final instance variable. So these two programs are both illegal: