Prev Next

Java / Modifiers

When is it appropriate to use final blank variables?

A final property of a class must have value assigned before even the object is created. So the last place would be to assign value is constructor. This pattern is usually followed in Immutable design pattern.

More Related questions...

Show more question and Answers...


Comments & Discussions