I could not understand some parts(i.e Bold Text) of the Effective Java of item 71 it says,
Lazy initialization is the act of delaying the initialization of a field until its
value is needed. If the value is never needed, the field is never initialized. This
technique is applicable to both static and instance fields. While lazy initialization
is primarily an optimization, it can also be used to break harmful circularities in
class and instance initialization
Thanks & Regards,
if user enter the value for usdf ,then only you plan to create a object for UserDefinedField[using Factory method getUserDefinedField()] and want to set the value. otherwise(if user ignore the UserDefinedField ) there is no need for creating an Object for usdf.
Getting my explaination ?
Thanks For Your Reply,
Campbell Ritchie wrote:surya.raaj prakash, have you checked the Bloch05 reference given in Effective Java?
Yes,I have checked. you mean Java Puzzlers By Joshua Bloch, Neal Gafter Right?
And This is an excellent Books,again thank you cambell...for given the great reference