Header Ads

  • Breaking Now

    What is Data Encapsulation?

    Data Encapsulation is wrapping informations(attributes and behaviors) within an object.A suitable example is a class as it wraps methods and data within itself. The attributes of a class corresponds to its data members while behaviour corresponds to member methods of the class.

    9 comments:

    1. Nishanth Thomas ,BangaloreJuly 4, 2010 at 10:56 AM

      Wrapping data and function into single unit is called encapsulation

      ReplyDelete
    2. Good Answer Nishanth....

      ReplyDelete
    3. Mandeep singh, DelhiMay 20, 2011 at 8:57 PM

      In other words, data encapsulation is basically binding together data and the methods that act on that data, into a single unit.

      ReplyDelete
    4. Mandeep Singh, DelhiMay 20, 2011 at 8:57 PM

      In other words, data encapsulation is basically binding together data and the methods that act on that data, into a single unit.

      ReplyDelete
    5. encapsulation means class have a modifier like: private, protected and public.
      private : other class can not access the data.
      public : can access.
      protected : class in different package can not access the data.

      therefore its called data hiding.

      ReplyDelete
    6. data encapsulation have a class modifier :
      private : differnt class can not access data.
      public : can access.
      protected : class in different package can not access.
      therefor, its called data hiding.

      ReplyDelete
    7. data encapsulation have a class modifier :
      private : differnt class can not access data.
      public : can access.
      protected : class in different package can not access.
      therefor, its called data hiding.

      ReplyDelete
    8. data encapsulation have a class modifier :
      private : differnt class can not access data.
      public : can access.
      protected : class in different package can not access.
      therefor, its called data hiding.

      ReplyDelete
    9. It is a mechanism to bind attributes and behaviours together to avoid outside interference and misuse

      ReplyDelete

    Post Top Ad

    Post Bottom Ad