View RSS Feed

Recent Blogs Posts

  1. Self-encapsulate fields

    by , 04-26-2012 at 07:11 PM
    Within class implementation, this is a coomon thing to refer to the private fields directly. Another style present where all of the internal references present are indirect & further proceedings is done via set & get methods. This is what is known as self encapsulation.


    • is required to do the lazy initialization
    • is more difficult for reading as compared to the direct field access
    • Might be able to develop the synchronization policies,