View RSS Feed


Entries with no category

  1. Static Fields and Methods

    by , 03-02-2012 at 05:16 PM
    Methods and fields might be declared static. This is also possible for C++. Only one copy is present for the complete class when field is static, rather than one copy for all class instances. If class instance is not present even then field’s copy is available. For example, given field addition in List class:

    static int numLists = 0;

    And, the given statement addition in the List constructor:


    When new List object creation takes ...